Tip 1 : Have strong knowledge of the basic concepts of DS and Programming
Tip 2 : Be Confident and have faith in yourself
Tip 3 : Have a Strong Balanced Resume
Tip 1 : Good Projects
Tip 2 : Maintain a good balance in all the sections of the resume
Type of Questions No. of Questions
Quantitative 20
Logical and Reasoning 20
Verbal 20
Section II: Coding Section
Number of Questions: 2
Time Duration: 60 min
Level of Difficulty: Easy-Medium
Type of Questions: String Manipulation and Tree based Question




1. Make in-place changes, that is, modify the nodes given a binary tree to get the required mirror tree.



Input: 'str' = "aaccb"
Output: 2
Explanation: We can make a valid partition like aa | cc | b.
It was a non eliminatory round comprising of 3 sections with a total time of 30 minutes.
Section I: Technical MCQ’s
Number of Questions: 20
Level of Difficulty: Medium -High
Programming Output questions and questions from CN, DBMS, OS and DS were asked.
Section II: Aptitude and Logical Section
Number of Questions: 10
Level of Difficulty: Easy
Section III: Coding Section
Number of Questions: 2
Level of Difficulty: Easy-Medium



1. Rightmost element is always a leader.
2. The order of elements in the return sequence must be the same as the given sequence
The given sequence is 13, 14, 3, 8, 2 .
13 Not a leader because on the right side 14 is greater than 13.
14 lt is a leader because no one greater element in the right side.
3 Not a leader because on the right side 8 are greater than 3.
8 It is a leader because no one greater element on the right side.
2 It is a leader because it is the rightmost element in a sequence.
Hence there are 3 leaders in the above sequence which are 14, 8, 2.




The interview went for about 75-80 minutes. I was not able to answer almost all the answers
correctly but gave almost 75% correct answers. The interviewer mainly focused on the problem
solving ability and the quality of conceptual knowledge.
1: Basic Introductory Questions
2: 2-3 Puzzle Questions
3: Some basic Questions on DSA- about stacks, queue, arrays, memory storage accessing,
Advantages and Dis of Linked list over arrays,
4: Operating System: In all the rounds , Operating System questions were asked in abundance.
Though the questions were basic, they focused more on our concepts like how easily we were
able to explain it to them.
Questions on Kernels, Types of Kernel, Why OS, memory allocation in OS were asked.
5: Test Cases Question: We have to think and answer the possible questions while testing the
cases.
i: Test cases for a login page window.
6: Heavy discussions on the projects I have done. Why we preferred to use a particular
technology. What was my role in the project and so on.
7: I was asked to code some questions.
You have a birthday cake and have to cut it into 8 equal pieces by making 3 cuts only. How
do you do it?
You are standing before two doors. One of the path leads to heaven and the other one leads
to hell. There are two guardians, one by each door. You know one of them always tells the truth
and the other always lies, but you don’t know who the honest one is and who the liar is.
You can only ask one question to one of them in order to find the way to heaven. What is the
question



a) Duplicate elements may be present.
b) If no such element is present return -1.
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.
Output: 6
Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.



In the given linked list, there is a cycle, hence we return true.

This round of interview was took by a senior person of the company. It was a bit lengthy as we
had more of a discussion rather than just a QnA round. The interview went for more than 90
minutes and was tougher than the first round.
1: There was a long discussion on what I written in my resume. The projects I had done,
Extracurricular and co-curricular activities I had written on the resume, the skills I have
mentioned. All of it. So be careful of whatever you mention in the resume.
2: Next he asked me a bunch of coding questions which were some very popular ones
I was asked to code in my preferred language. So there wasn’t any language barrier and for all the
questions the interviewer asked for the most optimized approach.
As I was able to answer all the questions, I wasn’t asked any more questions.
3: After the coding questions, I was asked a lot of questions of Operation System and OOPS.
i: Fragmentation- Internal and External
ii: Concepts of Kernel
iii: File Management
iv: Virtual functions and Friend Functions
v: Function Overloading And Overriding
vi: What is paging and Demand Paging?
4: Interview puzzles:
5: Testing Based Questions-
i: Five new inventions in a glass frame and the test cases to test the working a frame.
ii: Design test cases for a shopping application.
The interviewer was quite satisfied with the test cases I answered. As the main trick to solve
these kind of interview questions is to design the test cases with giving every small function an
eye and then forming all possible scenarios for the same
i: Fragmentation- Internal and External
ii: Concepts of Kernel
iii: File Management
iv: Virtual functions and Friend Functions
v: Function Overloading And Overriding
vi: What is paging and Demand Paging?



Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams.
'triangle' and 'integral'
'listen' and 'silent'
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct.
Create count arrays of size 256 for both strings. Initialize all values in count arrays as 0.
Iterate through every character of both strings and increment the count of character in the corresponding count arrays.
Compare count arrays. If both count arrays are same, then return true.



Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".
Input string will always be lowercase characters without any spaces.
If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.
Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.
The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.


1. To implement means you need to complete some predefined functions, which are supported by a normal queue such that it can efficiently handle the given input queries which are defined below.
2. The implemented queue must support the following operations of a normal queue:
a. enQueue(data) : This function should take one argument of type integer and place the integer to the back of the queue.
b. deQueue(): This function should remove an integer from the front of the queue and also return that integer. If the queue is empty, it should return -1.
c. peek(): This function returns the element present in the front of the queue. If the queue is empty, it should return -1.
d. isEmpty(): This function should return true if the queue is empty and false otherwise.
3. You will be given q queries of 4 types:
a. 1 val - For this type of query, you need to insert the integer val to the back of the queue.
b. 2 - For this type of query, you need to remove the element from the front of the queue, and also return it.
c. 3 - For this type of query, you need to return the element present at the front of the queue(No need to remove it from the queue).
d. 4 - For this type of query, you need to return true if the queue is empty and false otherwise.
4. For every query of type:
a. 1, you do not need to return anything.
b. 2, return the integer being deQueued from the queue.
c. 3, return the integer present in the front of the queue.
d. 4, return “true” if the queue is empty, “false” otherwise.
Operations:
1 5
1 10
2
3
4
Enqueue operation 1 5: We insert 5 at the back of the queue.
Queue: [5]
Enqueue operation 1 10: We insert 10 at the back of the queue.
Queue: [5, 10]
Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
Output: 5
Queue: [10]
Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
Output: 10
Queue: [10]
IsEmpty operation 4: We check if the queue is empty.
Output: False
Queue: [10]



1. Constructor:
It initializes the data members(queues) as required.
2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.
3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.
4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.
5. size() :
It returns the size of the stack at any given instance of time.
6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)
Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)
Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)
Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)
Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Operations:
1 5
1 10
2
3
4
Enqueue operation 1 5: We insert 5 at the back of the queue.
Queue: [5]
Enqueue operation 1 10: We insert 10 at the back of the queue.
Queue: [5, 10]
Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
Output: 5
Queue: [10]
Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
Output: 10
Queue: [10]
IsEmpty operation 4: We check if the queue is empty.
Output: False
Queue: [10]
There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars:
You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that has/have to be picked in order to label the jars correctly.
There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them) into the bowls to maximize the chance of picking a white ball.
100 prisoners in jail are standing in a queue facing in one direction. Each prisoner is wearing a hat of color either black or red. A prisoner can see hats of all prisoners in front of him in the queue, but cannot see his hat and hats of prisoners standing behind him.
The jailer is going to ask color of each prisoner’s hat starting from the last prisoner in queue. If a prisoner tells the correct color, then is saved, otherwise executed. How many prisoners can be saved at most if they are allowed to discuss a strategy before the jailer starts asking colors of their hats.
This was also similar to the last two Technical Interviews and was also easier from them. The
interview went for about 70 minutes and it was tilted more towards managerial side and less
technical questions were asked.
1. Program to Count set nits in an integer. (I answered 4 possible solutions to him and he was
satisfied)
2: Working of Bubble Sort and Insertion Sort ( I was asked to dry run the solution mainly to
check the internal working of swapping and comparison)
3: Some Mathematical Puzzles
4: Design test cases for OLA Application
5: Design test cases for GMAIL Application
6: Situation based questions
What is a Semaphore and operations on a semaphore?
What is context switching?
There are 4 persons (A, B, C and D) who want to cross a bridge in night.
A takes 1 minute to cross the bridge.
B takes 2 minutes to cross the bridge.
C takes 5 minutes to cross the bridge.
D takes 8 minutes to cross the bridge.
There is only one torch with them and the bridge cannot be crossed without the torch. There cannot be more than two persons on the bridge at any time, and when two people cross the bridge together, they must move at the slower person’s pace.
It was the last round and an eliminatory round as well. It was a 15 minutes long discussion round
about college life, interests, and hobbies. The HR also asked our preferred joining location
between Noida and Bangalore which gave us many hopes of our selection.
Three candidates from our college went till the HR Round.
Tip 1: Keep a sharp mind on the talks in the interview room and then answer
Tip 2: Agree if the location given to you is not your preference. Later we get chance for internal switching.
Tip 3: Speak what is not mentioned in your resume

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?