Round 1 : Online Test
Online Test : This round had certain sections. In each section, one had to answer the questions in order. We couldn’t skip questions and re-attempt them later. The 4 sections were:
- DSA concepts : AVL Tree Rotations , BST Traversals
- CS courses concepts such as OS, DBMS, OOP
Round 2 : Technical Round (Due to coronavirus lockdown, the interviews were held on Zoom)
The interviewer asked to give an intro about myself, went through my resume. And asked me to brief about my projects.
He asked me basic questions regarding web development, network protocols.
Then he asked me two coding questions:
1.In a class having n students. Assume one student is missing while teacher is taking attendance. Find the missing students roll number. Assume roll no is in range 1 to n.
This is similar to Find missing element in an array which has values in range 1 to n. (using XOR)
2. Merge n sorted linked lists( may contain duplicates)
- Explain Abstraction, Encapsulation
- Difference between hash set and set
- Difference between array and lists
Round 3: Technical Round
1. Find the square root of a number n. If not a perfect square find floor( no predefined functions can be used)
2. N players are playing chinese whisper. 1st person always hears the correct message. But when the message reaches the nth player it might get corrupted. So we ask all the players to list out what they heard at the end of the game. Find the number of faulty players.
Assume player 1 hears value given at index 0
The player is faulty if either they misheard it or they passed the wrong message
So when a miscommunication happens between player1(p1) and player2(p2) happens. There are 2 possible cases:
CASE 1: p1 – said correctly , p2 – heard incorrectly
CASE 2: p1 – said incorrectly , p2 – heard correctly
But since we don’t know which of the 2 happened. We consider the 2 possible cases ie both p1 and p2 are guilty.
Input : 1 1 1 2 2 3 3 3 2
Output : 6
Explanation : Players 3 , 4 , 5, 6 , 8 , 9 are guilty
Input: 1 1 1 2 2 3 2 3 2
Explanation : Players 3 , 4 , 5, 6 ,7 , 8 , 9 are guilty
Given an employee table with id and their email. Find the duplicate email ids.
SELECT email FROM employee
GROUP BY email HAVING COUNT(*) > 1
- Run time Polymorphism
- Dangling Pointers
The interviewer will try to give you hints. Try to stay calm and focus.
Round 4 : Technical + HR Round
The interviewer asked me about my Previous Internship Experience.
A string is valid if it has string has ‘T’ , ‘R’ , ‘U’ , ‘E’ characters in the same order. Any character can appear any number of times consecutively
Valid string : “TTTRRUEEE” , “TRUUUE”
Invalid string :”TRUETT” , “TRTUTE” , “TRUEEEER” ,”TRRRR” ,”RRUE”
One Java output Question regarding array list
Some typical HR questions.
Verdict : Not Selected