OYO interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

OYO
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: DSA, CS Fundamentals, SQL, NOSQL, OS, DBMS
Tip
Tip

Tip 1 : Practise must do or most asked interview questions available on various platforms.
Tip 2 : Apart from coding also focus on cs fundamentals they are asked in many companies these days.

Application process
Where: Campus
Eligibility: NO
Resume Tip
Resume tip

Tip 1 : Highlight you skills very nicely.
Tip 2 : Also put your every single achievement related to coding profile on the resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date8 Nov 2020
Coding problem1

1. Permutations of a String

Moderate
15m average time
85% success
0/80
Asked in companies
GoogleBarclaysAccenture

Ninja has been given a string ‘STR’ consisting of lowercase English letters. ‘STR’ might contain duplicate characters too. Ninja has to return all unique permutations of the given string in lexicographically increasing order.

Can you help Ninjas to do this task?.

String 'STR1' is lexicographically less than string 'STR2', if either 'STR1' is a prefix of 'STR2' (and 'STR1' ≠ 'STR2'), or there exists such i (1 <= i <= min(|'STR1'|, |'STR2'|)), such that 'STR1[i]’ < 'STR[i]’, and for any j (1 <= ‘j’ < ‘i’) 'STR1[i]’ = 'STR2[i]’. Here |'STR1'| denotes the length of the string 'STR1'.

For example :
If the string is “aab”, then its unique permutations in lexicographically increasing order are { “aab”, “aba”, “baa” }.
Problem approach

Used Recursion and took every case and printed permutation for the same.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Nov 2020
Coding problem2

1. Minimum Jumps

Moderate
25m average time
75% success
0/80
Asked in companies
DirectiMorgan StanleyAdobe

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

Problem approach

Used DP solution , used every entry as a jump and check about how max can we jump by every entry and found minimum jumps.

Try solving now

2. First Missing Positive

Moderate
18m average time
84% success
0/80
Asked in companies
SalesforceProtiumQualcomm

You are given an array 'ARR' of integers of length N. Your task is to find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can have negative numbers as well.

For example, the input [3, 4, -1, 1] should give output 2 because it is the smallest positive number that is missing in the input array.

Problem approach

int firstMissingPositive(vector& nums) {
map mp;
for(int i=0;i{
mp[nums[i]]=i;
}
int i;
for( i=0;iif(mp.find(i+1)==mp.end()){
return i+1;
}
}
return i+1;
}

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date9 Nov 2021
Coding problem2

1. Count Ways To Travel Triangular Pyramid

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonMicrosoftOYO

Bob has been given a triangular pyramid with its vertices marked as ‘O’, ‘X’, ‘Y’ and ‘Z’ and provided with another integer ‘N’. In a single step, Bob can go to any adjacent vertices. Bob will always start from ‘O’ and has to return to ‘O’ after making exactly ‘N’ steps.

Example

Your task is to find out the number of ways he can take to complete his journey.

Note :

As the answer can be very large, return the answer by taking modulo with 1000000007.

For example :

If ‘N’=1 
So in 1 step we can reach either to ‘X’ , ‘Y’ or ‘Z’ and can not travel back to ‘O’.
Thus there are 0 ways.

If ‘N’ =2
So there are total three ways :
(i)  O->X->O
(ii) O->Y->O
(iii) O->Z->O

If ‘N’ = 3
So there are total 6 ways :
(i) O->X->Y->O
(ii) O->X->Z->O
(iii) O->Y->X->O
(iv) O->Y->Z->O
(v) O->Z->X->O
(vi) O->Z->Y->O
Problem approach

A table T[][] is created where the row represents the number of ways and the column represents the position.
In order to fill the table, one observation needs to be made. That is, we can go back to the position O if we are not at O in the previous step.
Therefore, the number of ways to reach the origin O in the current step is equal to the sum of the number of ways the person is not at the origin O in the previous steps.

Try solving now

2. Combination Sum IV

Moderate
0/80
Asked in companies
OYOFastenal

You are given an array of distinct integers and you have to tell how many different ways of selecting the elements from the array are there such that the sum of chosen elements is equal to the target number tar.

Note: Two ways are considered the same if for every index the contents of both the ways are equal example way1=[1,2,3,1] and way2= [1,2,3,1] both way1 and way 2 are the same.

But if way1 =[1,2,3,4] and way2= [4,3,2,1] then both ways are different.

Input is given such that the answer will fit in a 32-bit integer.
For Example:
If N = 3 and tar = 5 and array elements are [1,2,5] then the number of possible ways of making sum = 5 are:
(1,1,1,1,1)
(1,1,1,2)
(1,2,1,1)
(2,1,1,1)
(1,1,2,1)
(2,2,1)
(1,2,2)
(2,1,2)
(5)
Hence the output will be 9.
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
1633 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by OYO
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by OYO
804 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by OYO
571 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
107832 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
52130 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
32261 views
6 comments
0 upvotes