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

SDE - Intern

OYO
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, Oops, System Design, Data Base, Networks
Tip
Tip

Tip 1 : Prepare Data Structures
Tip 2 : Solve atleast 300-400 problems
Tip 3 : Prepare computer science subjects for solving MCQ's

Application process
Where: Campus
Eligibility: BTech(IT, EC), Dual (IT & EC) with no active backlog.
Resume Tip
Resume tip

Tip 1 : Projects around oops would be great
Tip 2 : Be confident about everything you write

Interview rounds

01
Round
Easy
Online Coding Interview
Duration1 hr 30mins
Interview date16 Dec 2020
Coding problem0

1st round was the coding round which consists of 25 MCQ’s and 2 Programming Questions. I don't remember the coding questions but one was from arrays and one from strings.

02
Round
Easy
Video Call
Duration90 minutes
Interview date21 Dec 2020
Coding problem2

1. Detect Cycle in a Directed Graph

Moderate
25m average time
65% success
0/80
Asked in companies
FlipkartAmazonAmerican Express

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least one cycle, else return false.

Problem approach

I used DFS from every unvisited node. There is a cycle in a graph only if there is a back edge present in the graph.
To find the back edge to any of its ancestor keep a visited array and if there is a back edge to any visited node then there is a loop and return true.

Try solving now

2. Next Permutation

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

You have been given a permutation of ‘N’ integers. A sequence of ‘N’ integers is called a permutation if it contains all integers from 1 to ‘N’ exactly once. Your task is to rearrange the numbers and generate the lexicographically next greater permutation.

To determine which of the two permutations is lexicographically smaller, we compare their first elements of both permutations. If they are equal — compare the second, and so on. If we have two permutations X and Y, then X is lexicographically smaller if X[i] < Y[i], where ‘i’ is the first index in which the permutations X and Y differ.

For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Problem approach

Traverse from right and find the first item that is not following the descending order.
Swap the found character with closest greater (or smallest greater) element on right side of it.
After swapping, sort the string after the position of character found.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date21 Dec 2020
Coding problem1

1. Validate BST

Moderate
25m average time
70% success
0/80
Asked in companies
IBMAmazonMicrosoft

Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is said to be a Partial BST if it follows the following properties.

• The left subtree of a node contains only nodes with data less than and equal to the node’s data.
• The right subtree of a node contains only nodes with data greater than and equal to the node’s data.
• Both the left and right subtrees must also be partial binary search trees.
Example:

Input:

BST1

Answer:

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtree for node 5 is empty.

Level 3:

For node 1:
The left and right subtree for node 1 are empty.
For node 3:
The left and right subtree for node 3 are empty.
Because all the nodes follow the property of a Partial binary 
search tree, the above tree is a Partial binary search tree.
Problem approach

I gave him two three approaches.
Brute force
using utility class
using in-order traversal:

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 - Intern
3 rounds | 10 problems
Interviewed by OYO
1036 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by OYO
2547 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 2 problems
Interviewed by OYO
970 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by OYO
947 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13918 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
13230 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
9229 views
2 comments
0 upvotes