Tip 1 : Do Standard DSA Questions
Tip 2 : Be confident in telling your approach
Tip 3 : Believe in yourself
Tip 1 : Have a one page resume
Tip 2 : Don't write false information on resume
The first one hour is for solving 20 quant questions they were similar to questions asked in GRE.
The next 1.5 hour is for coding 5 problems. The editor in which we have to code was very bad.



'arr '= [1,2,3,4,5]
'k' = 1 rotated array = [2,3,4,5,1]
'k' = 2 rotated array = [3,4,5,1,2]
'k' = 3 rotated array = [4,5,1,2,3] and so on.



You are given ‘ARR’ = {1, 2, 2, 3, 3} and ‘K’ = 2.
The answer will {2, 3} as 2 and 3 are the elements occurring most times.
Used Hashmap to solve the problem



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then (2, -3, 1), (-3, 2, 1) etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
First sort the array then used two pointer approach



Solved Using Backtracking.



Let ‘N’ = 4, ‘Arr’ be [1, 2, 5, 4] and ‘K’ = 3.
then the elements of this array in ascending order is [1, 2, 4, 5]. Clearly, the 3rd smallest and largest element of this array is 4 and 2 respectively.
Used heap data structure to solve the problem
Round started with my introduction. Interviewer asked me questions related to OOPS and C++. After that 2 coding DSA questions were asked.


1) If the theater is empty, i.e., if no one is in the theater, they sit in the first seat(seat number 0).
2) If there are multiple seats that maximize the distance from the closest person, they sit in the seat with the lowest number.



For the following array:
[0 1 1 1 0 0 1]
The output should be [0 0 0 1 1 1 1].
You have to sort the array in place.
Used two pointer to solve the problem
It was a managerial round. I was grilled on my projects very much. The guy asked me so much regarding my project. He also asked me one puzzle which I cannot answer.
There is a room with a door (closed) and three light bulbs. Outside the room, there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can’t change them. Identify each switch with its bulb. All bulbs are in working condition.
Tip 1 : Understand the problem completely
Tip 2 : Ask questions to the interviewer
Tip 3 : Don't Assume anything from your side

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?