The pre-interview selection round had common Aptitude Questions and a Coding question.
For Apti we had 20 questions – Solving Time (30 minutes) ( Questions were moderate not so easy again not so difficult )
For Coding – 1 question – Solving Time (1 hour ) ( Coding question was very easy )
Here’s the question as far as I remember:
A binary tree has to be filled with characters ‘S’ and ‘D’. ‘S’ means alive nodes and ‘D’ means dead nodes. ‘S’ node bears 2 children or 1 child and ‘D’ node bears no child at all. For indicating no nodes we use the character ‘X’.
The tree input was given in level order.
Output: Find the level which contains maximum number of ‘S’
Find a) number of nodes from the tree b) level of the tree from the given nodes c) construct a for loop such that it iterates through each level and keep a count of the number of S encountered d)Print the level which has the maximum ‘S’
1st Technical cum HR interview:
Asked about the code and approach.
How can you optimize the approach?
Being in Electronics and Telecommunication why would you like to pursue a career in a Software firm?
( Ans: No previous coding knowledge until I joined college, regular participant in online coding competitions, competition for Hardware companies was tough etc etc )
Between 1 to 100 natural numbers, write a code to find all the possible triplets which satisfy Pythagoras’ Theorem!
After writing the code, asked about complexity of the code?
a) 8 litres of water in a jug. How can you have 4 litre, given a 5 litre and a 3 litre jug?
b) Burning Rope Problem
2nd Technical cum HR interview:
Asked about my project in detail.
Write a code to implement Bubble Sort!
Write a code to find whether a string is a Palindrome or not?
Given a large string! Find the largest palindrome sequence!
Advice: Be to the point and talk smartly.Communication is the key for Goldman, so better be good at it.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
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.