OYO visited our campus for the SDE-1 profile. A total of 328 students had applied for it.
The placement test comprised of 20 MCQ questions and 2 coding problems. From the 20 MCQ, only 2 aptitude questions were there, the rest of them were from Operating Systems, DBMS, DSA, and Output of Code Snippets. The coding questions were:
- In old mobile systems to type ‘a’ we had to press 2 once, to type ‘b’ we had to press 2 twice, to type ‘o’ we had to press 6 thrice. You are given a string of digits as input. You need to print all possible decodings of the given string.
- You are given two strings. Find out if 1st string contains a permutation of 2nd string as a substring or not.
Explanation: “owo” a permutaion of “woo” is present in “helloworld”.
45 students were on the shortlist, 13 on waitlist1, and 11 on waitlist2. Total of 69 candidates for the interview. I was in waitlist2. Thanks to the interviewing team of OYO, they interviewed all 69 candidates.
The interview consisted of 2 Rounds. Both were technical.
Round 1: The interviewer introduced himself and then asked me to introduce myself. Then he asked me to share my screen and open any IDE of my choice, I chose VSCode. Then he asked me two questions.
- Given a string. Find the Longest Palindromic Substring. I had practiced the questions before but wasn’t able to recall the approach. It was my first interview, so I was a bit nervous. I managed to find the length of the longest palindromic substring, but could not print the actual string.
It is important to say out loud, what approach you are planning to take. Don’t just start coding it. Speak as you formulate your approach, and when you have your approach ready, then start implementing it. Also, try to do your rough work on the screen, not on your notebook, the interviewer cannot see your notebook.
- Given a N x N matrix. How many possible ways are there to reach the bottom-right cell from the top-left cell, given we can only move in the right and down directions only. He first asked to explain the approach. I said DFS. He then asked to explain how will the DFS work on the matrix. This time he didn’t ask me to code, instead, he asked me the expression for the DP-matrix that would be used to calculate the maximum number of paths. Again I had solved this problem before, but wasn’t able to give the DP-expression, but gave him a recursive expression and explained how the recursive expression would work in code. He then asked about the time-complexity of my approach. It was exponential, O(2^n).
After this, he asked If I had any questions for him. I asked him about the company. Then he wished me the best of luck for the next round. I wasn’t expecting it, I thought I had messed up.
Round 2: The 2nd Round went very well. It started with an exchange of greetings. Then I was asked to tell about my projects. Then the interviewer explained to me the question very nicely in detail, then asked to find an approach to the solution.
The question was:
- Given a word list, a start word, and an end word. Find the minimum number of valid transitions required to reach the end word from the start word. A transition is valid if the new and old words differ in one alphabet only.
Again, speaking as you build your approach is important.
I started by selecting a data-structure that can help solve the problem. I had mentioned the Trie data structure, so he asked me about the trie data structure, then explained why it is not the right choice. After a bit of discussion, I used the Graph data-structure. He asked if I was comfortable with graphs, otherwise, he would change the question. I was comfortable so we continued. The wrt the question, I explained what a node of the graph would represent, what do the edges represent, and what searching technique(BFS) we would use and why(it gives the minimum distance from the root(start node)). I tried a dry-run of the approach on a sample input and It gave the correct output.
Now he asked me to implement this approach which I successfully did.
Next, he asked me to tell the difference between thread and process with examples. I gave a satisfactory answer.
The results were out the next day. 17 students were selected, and I was one of them.