Problem of the day
Tip 1 : Revise all the coding interview questions that you have solved so far in the last few days
Tip 2 : Practice writing the codes on paper with clarity
Tip 3 : Mention only those thing that you know in your CV and revise your projects nd everything you have mentioned on your resume thoroughly.
Tip 1 : Do not even mention topics you have no idea about
Tip 2 : you should have some projects on resume and you should be able to explain clearly why you have chosen the particular project, what does it do, its functionality, outcomes and everything about each of the projects.
Tip 3 : Tailor your resume according to the needs/the role you are applying for
A 120-minute online test was conducted on HackerRank which had the following format:
1st Section :
2 Coding questions(30 minutes)
2nd Section :
10 MCQ questions(30 minutes)
3rd Section :
1 Advanced Programming Question(45 minutes)
4th Section :
2 Subjective Questions(15 minutes)
The coding questions and MCQ questions were a bit tricky so you need to manage your time properly and try to solve all the questions correctly..
Technical – included c and c++ output question, os(scheduling, semaphore), dbms(normal form, etc).
There are N people in a party, they might or might not know each other names.
There is a celebrity in the group, celebrity does not know anyone and all people know the celebrity.We can only ask questions like “does A know B?”. (Celebrity problem)
What is the worst case time complexity of the optimal solution to find the celebrity?
Let’s say we ask “does A know B?”. If A knows B...
Approach: The idea is to use two pointers, one from start and one from the end. Assume the start person is A, and the end person is B. If A knows B, then A must not be the celebrity. Else, B must not be the celebrity. At the end of the loop, only one index will be left as a celebrity. Go through each person again and check whether this is the celebrity.
The Two Pointer approach can be used w...
Suppose we start our summation series from 1 i.e. 1+2+3+…..
Max no. of numbers whose summation will be less than or equal to N: floor(X)
So N as a sum of positive consecutive integers will at max consist of X numbers.
Here we can check each possibility k(assume) between 2 and X (both inclusive) and to check we can use the concept of A.P. as the summation series is ...
interview started with a typical tell me about yourself question. The interviewer was nice and friendly.
He asked me to explain a little about my projects (only basics).
Which all data structures you know and my favourite data structure. I replied with a linked list.
He asked the difference between array and linked list, time complexities of insertion, deletion, etc. in both of them. Then he asked about sorting an array, different algorithms, and their time complexities.
How would you sort a linked list? How would you find the middle of the linked list in one pass? How would you merge two linked lists (I had to write code for the same)?
Then he asked how would you be able to manage the business and finance decisions at GS.
Tell me an incident when you had the chance to display your leadership skills.
Lastly, I was allowed to ask questions from the interviewer.
intially a solution that finds whether given nodes are cousins or not by performing three traversals of binary tree has been discussed. next after asking for any different or optimal way to solve the same question by interviewer,
the approach to solve the problem by performing level order traversal is discussed . The idea was to use a queue to perform level order traversal, in which each que...
This round was relatively short and mostly consisted of coding (on hackerrank’s codepair platform)
The interviewer asked me about my previous interview and what all questions were asked in it.
Then there was a discussion about my projects and the technologies used in them. How would you deploy an application and what happens in the process of entering a keyword in the browser and loading your requested page?
He asked me to write the code for finding the middle of a linked list in one pass.
After that, I had to write the code for the implementation of a queue. I first discussed the approaches with him using array and linked lists for some time. They wrote the code using a linked list by taking head and tail pointer.
He was satisfied with it and the round ended with me asking him the questions I had.
Traverse linked list using two pointers. Move one pointer by one and the other pointers by two. When the fast pointer reaches the end slow pointer will reach the middle of the linked list.