Open In App

# OYO Interview Experience – SDE 2

Round 1:
This was a written round. 2 questions were asked.

1. Sum of digits is given and count of digits is given, we need to return number of such numbers possible.
For e.g, if sum is 4 and count is 2, then numbers possible are: 13, 22, 31, 40
so output is 4

https://www.geeksforgeeks.org/count-of-n-digit-numbers-whose-sum-of-digits-equals-to-given-sum/

2. A BST is given and a number K is given. We need to return kth smallest element from BST.

Whoever solved 1 question was called for face to face interviews.

Round 2:
This was a face to face interview.

1. First discussion about written round questions. I had solved both questions so I was asked to provide optimizations for ist question.
I had coded iterative approach, so first I optimized it then I explained how question could be solved using recursion and DP.

2. A BST is given, in which 2 nodes are swapped. We need to return original BST. He wanted code for this. Normal recursive solution was accepted.

Round 3:

1. Discussion about previous projects.
2. What is database Indexing and how is it implemented?
3. How to threads communicate as in pass messages in a multi threaded environment?
4. https://www.geeksforgeeks.org/minimum-time-required-so-that-all-oranges-become-rotten/
5. https://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/
Round 4:
1. What is mutex and semaphore?
2. What is database indexing?
3. https://www.geeksforgeeks.org/diameter-of-a-binary-tree/
4. https://www.geeksforgeeks.org/minimum-steps-reach-target-knight/

Round 5: