I got an interview invitation from Oracle HR on LinkedIn, Process took one day to complete all 4 rounds. All rounds were technical and each round took 60 to 90 minutes.
Round 1: First-round was a basic screening round where the interviewer started with an introduction and with some basic Java questions as a warm-up. Then the interviewer jumped to coding questions, Two coding questions were asked I had to discuss the approach & have to write the code for the same.
- Find the index of an element in a sorted array. Some adjacent elements in the sorted array are swapped.
I gave a solution in O(logn) time by using binary search on 3 groups of elements. I could not find this question on GeeksforGeeks maybe it could be there you can search.
Here I missed some edge cases like when there are all 1s or 0s in the array. But the interviewer has given some hints So fixed my code. Later Same question interviewer extended for at most k replacement.
Round 2: The second round started just after the first round is finished, Interviewer started with a discussion on my previous work for a few minutes and then started with a coding question. Here also two coding questions were asked.
- https://www.geeksforgeeks.org/merging-intervals/. I have given a solution with the stack.
Round 3: The interviewer started with OOP questions, Multithreading, Where I used multithreading in my previous work? Some questions on scaling. The interviewer started with a design question.
- You have to develop a calendar system where employees working time (start time and end time for each day individually) can be stored in a database. When a new employee comes your system must accommodate it. I have to design the schema for this and I have to write the code to find the earliest one-hour time of k employees for the meeting. (It was a kind of variation of the previous problem where we have to merge intervals).
- The second question was strait forward coding question. https://www.geeksforgeeks.org/josephus-problem-set-1-a-on-solution/
Round 4: I have been informed this will be the final round, Started with my introduction, and then discussed my projects.
- After that interviewer moved to puzzle questions. https://practice.geeksforgeeks.org/problems/the-3-5-litre-die-hard-water-puzzle
- The next question was the design question, A manufacturer can manufacture everything like a bike, laptop, frizzier, Wasgihmachine, etc. If he wants to manufacture a laptop then he needs some spares parts like RAM, Motherboard, LCD/LED, etc. Note: These spares parts may further require some other spares parts like Motherboard will be required CPU etc. These spares parts could be of any number e.g A Laptop will require 1 motherboard and some number of USB ports let say 3. I have to design its database schema to store product and spare parts with their relation, Object model and I have to write the code to find the number of specific spares parts. Note: This could be a sub-spares part e.g A bike needs 2 wheels and each wheel required 2 breaks to manufacture then findSparesParts(laptop, break) must return 4. I solved it by organizing products (Spares parts are also final products) into graphs and with the use of graph traversal I given the definition of findSparesParts().
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.