- 3 coding questions (1 easy and 2 medium). I passed 2 (1 easy and 1 medium) out of them. But cutoff was any one code. Platform was hackerearth. 33 students were selected for the next round.
- Code 1- You are on a circular path of 10100 unit radius from your initial position you can move whether in clockwise direction or in anticlockwise direction but you can move only along the circular path. Your movements are represented by a string S of length L. The string can consist of three different types of characters each denoting a move.
- A- you move one unit in anticlockwise direction
- C- you move one unit in clockwise direction
- ? – you move one unit either in clockwise or anticlockwise direction
- Write a program to find the maximum distance from the initial position in any direction at any point of time.
- Code 2- You are given an array of N positive integers you have to perform following operations on the elements of the array
- In one successful operation you can remove two positive numbers A and B from the array and insert their some that is a + b into the position of either element A or B. To insert the sum a + b at the position of element a the condition a>=b should be satisfied similarly to insert the sum at the position of element b condition b>=a should be satisfied. If you insert the sum a+b at a position of element a then element b will be assigned the value -1 similarly if you insert it at a position b the element a will be assigned value -1. At the end only one position will remain in an array that will contain a positive number. Combination is defined as the set of all successful operation that you can perform on the elements of the array and at last single positive element remains at the end. Combinations are different if they lead to a different position of the element that remains positive at the end of all successful operations for that combination. Now you have to count how many distinct combinations can be possible for the given array.
- Code 3- Saurav is a pro coder who has reached Google’s office for his interview. His interview is on the nth floor and Saurav is initially on the 0th floor. Since Saurav loves problem solving a problem strikes his mind what are the total number of ways to reach the nth floor with following types of moves:
- Type 1 in a single move you can move from i to i+1 floor – you can use the this move any number of times
- Type 2 in a single move you can move from i to i+2 floor – you can use this move any number of times
- Type 3 in a single move you can move from i to i+3 floor – but you can use this move at most k times
ROUND 2- Resume round
- Tell me about yourself.
- Why did you join vit vellore?
- Favourite coding language.
- Any plans for higher studies?
- Projects- your contribution, challenges faced.
- Python libraries you know.
- The certificates in my resume.
- About NGO work.
- Normalization – why do we need 1NF, 2NF, 3NF, Update delete and insert anomaly
- She gave an example of a table and asked it is in which form?
- SQL queries- Print details of the student with nth highest marks, and one on joins.
- Write a code- https://www.geeksforgeeks.org/given-an-array-a-and-a-number-x-check-for-pair-in-a-with-sum-as-x/
- I gave the optimized one in starting using hashmaps (shouldn’t have done that)
- She asked the same questions with sum of 3……..I only knew the naive method.
- Then this- https://www.geeksforgeeks.org/trapping-rain-water/
- What is finalize?
- Do you know linux?
- Which os are you familiar with?
- Do you know design patters?
- Do you know git?
- Do you know azure?
- What does java uses compiler or interpreter?- Both -How?- Tell about JVM https://www.quora.com/Why-does-Java-use-both-compiler-as-well-as-Interpreter
- What is garbage collector?
- Which is better between merge sort and quick sort and y? https://www.geeksforgeeks.org/quicksort-better-mergesort/#:~:text=Quick%20sort%20is%20an%20in,sort%20the%20advantage%20of%20space.
- When will quick sort’s time complexity be O(nlogn)… I mean how should be arrangement of the array? https://www.geeksforgeeks.org/quick-sort/ at the bottom
Didn’t qualify for further rounds (They took 9)
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.