Tip 1 : Revised all type of algorithms which are more in use
Tip 2 : Do revise all related data structure to your preferred language
Tip 3 : Be confident and try to communicate with the interviewer especially in coding questions and puzzles.
Tip 1 : Clean and short
Tip 2 : Have some projects on resume.
This round consists of three coding questions 2 easy and 1 medium level to be solved within 1 Hr. The test was conducted on HackerEarth. Each question was on 10 marks each. I only remember 2 questions.
Note: Try to do all 3 questions to directly qualify for the interviews. If you are able to do 2 or 2.5 questions then they again organize another coding round for the left candidates.



1. It is an integer starting from 1.
2. The larger the element, the larger the rank. If two elements are equal, their rank must be the same.
3. It should be as small as possible.
'ARR' = [4, 7, 2, 90]
Here, 2 is the smallest element, followed by 4, 7, and 90.
Hence rank of element 2 is 1, element 4 is 2, element 7 is 3, and element 90 is 4.
Hence we return [2, 3, 1, 4].



The statement was twisted and a story for prison break was given. In this question also array size was not given used above method. I solved the first 2 questions completely and only 2 test cases in the third question were left unpassed.
This round was on HackerEarth of 100 marks containing 2 questions of 50,50 marks with the difficulty of medium and medium respectively. This round was after 1 day.






‘ROW1’ : [2, 5, 8, 17] and ‘ROW2’ : [1, 4, 8, 13, 20]
If ‘ROW1’ is [2, 5, 8, 17] and ‘ROW2’ is [1, 4, 8, 13, 20], then Ninja picks the first plates from each rows, plate containing 2 ladoos from ‘ROW1’ and a plate containing 1 ladoo from ‘ROW2’.
Then he gives the plate with 1 Ladoo to the first person in line and places the other plate back to its position.
This round was virtually and was scheduled for 1 hour time but my interview was completed in 30 minutes. This round was a rapid-fire round. The questions are:-
Tell me something about yourself, your hobbies.
Asked about my projects on machine learning. Not much discussion was done.
Have you implements any database on a project? I said no.
He asked me my preferred programming language: mine c++. then he asked the following question.
what is OOPS and name its features
Data Hiding vs Abstraction
Types of Polymorphism and examples of each. more questions on virtual functions.
What is interface?
What is abstract class? can we create its objects and constructor?
How will you explain the working of the internet to a 7 years old child. (don’t use any terminology). In this, I used more time as child don’t know any terminology and ended up explaining him network.
What is Constructor overloading? and question on its syntax
4 operations on STACK.
types of linked list
What is the N-QUEENS problem?
What is Round Robin?
What is FCFS?
TCP vs UDP
malloc vs calloc
What is a client-server model
Which protocols are used in video conferencing and chatting applications?
How many traffic lights are in India? I said it should in 3^n. lol, the answer was only 3
Then a pattern printing question was given and asked to write the logic on google docs. I coded it in 4 minutes.
Do you have any questions for me: I asked how long have you been in this company.
I told him that I was supposing that interview will be more on DSA.
Received a call from HR after 30 minutes for the next round and asked if I can join now.
The interviewer started directly with questions on google docs and timing was evening
Snail and Wall
Let’s think this thoroughly.
Every hour the snail climbs up 3 feet, it slides down 2 feet. So, the actual height it is climbing in 1 hour is 1 foot.
Similarly, in 25 hours, the snail would have climbed 25 feet, in 26 hours it would have climbed 26 feet and in 27 hours it would have climbed 27 feet, but things change after 27 feet.
As we know, the snail covers 3 feet up in 1 hour. So, in the 28th hour, the snail would have climbed 30 feet up the wall and would have reached atop the wall. Therefore the answer to this riddle is 28 hours.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Initialize three pointers prev as NULL, curr as head, and next as NULL.
Iterate through the linked list. In a loop, do the following:
Before changing the next of curr, store the next node
next = curr -> next
Now update the next pointer of curr to the prev
curr -> next = prev
Update prev as curr and curr as next
prev = curr
curr = next
Measure 4L using the given 3 buckets. Condition When we are not allowed to throw water out of the bucket.
1.1 When we are allowed to throw water out of bucket.
Step 1: Fill the 8L bucket full.
Step 2: Pour the water from 8L bucket to 3L bucket. Water in 8L bucket is now 5L. Empty 3L bucket.
Step 3: Pour the remaining water from 8L bucket to 3L bucket. Water in 8L bucket is now 2L. Empty 3L bucket.
Step 4: Pour the remaining 2L water from 8L bucket to 5L bucket. 8L bucket and 3L bucket are now empty and 5L bucket has 2L of water in it.
Repeat Step 1 to 4 again and we will have 4L of water in 5L bucket.
1.2 When we are allowed to throw water out of bucket.
Step 1: Fill the 5L bucket full.
Step 2: Pour the water from 5L bucket to 3L bucket. Water in 5L bucket is now 2L. Empty 3L bucket.
Step 3: Pour the remaining water from 5L bucket to 8L bucket. Water in 8L bucket is now 2L.
Repeat Step 1 to 3 again and we will have 4L of water in 8L bucket.
2.1 When we are not allowed to throw water out of bucket.
Step 1: First fill the 8L bucket full.
Step 2: Pour the water from 8L bucket to 5L bucket. Water remaining in 8L bucket is 3L.
Step 3: Pour the water from 5L bucket to 3L bucket. Water remaining in 5L bucket is 2L.
Step 4: Pour the water from 3L bucket to 8L bucket. Water in 8L bucket is 6L now and 3L bucket gets empty.
Step 5: Pour the water from 5L bucket to 3L bucket. Water in 3L bucket is 2L now and 5L bucket gets empty.
Step 6: Pour the water from 8L bucket to 5L bucket. Water remaining in 8L bucket is 1L 5L bucket gets full.
Step 7: Pour the water from 5L bucket to 3L bucket. Water remaining in 5L bucket is now 4L as 3L bucket already had 2L of water and when we poured water from 5l bucket to 3L bucket we poured 1L of water from 5L bucket and thus the remaining water in 5L bucket is now 4L.
2.2 When we are not allowed to throw water out of bucket.
Step 1: Fill the 5L bucket full.
Step 2: Pour the water from 5L bucket to 3L bucket. Water in 5L bucket is now 2L.
Step 3: Pour the remaining water from 5L bucket to 8L bucket. Water in 8L bucket is now 2L.
Step 4: Transfer 3L bucket water to 5L bucket and fill the 5L bucket full.
Repeat Steps 2 and 3 and the 8L bucket will now contain 4L of water.
Thus, we measured the 4L of water using the given three buckets.
Tell me something about yourself.
Asked about my projects.
What you know about the company and why you want to join it?
Asked about my internship and certifications.
Discussed location, Salary structure, bond, and various companies policies

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?