-
Notifications
You must be signed in to change notification settings - Fork 13
Interview Experience 156
"Round 1:(Online Coding Round ,1.5 hrs)
Total time :90 minutes.
- This was online round consisting of 2 coding questions and 28 MCQ.
- Coding questions:
- Kedane’s algo with slide modification.( i.e if all the no.s are negative then print the highest amongst them).
- https://www.geeksforgeeks.org/dice-throw-dp-30/
- 28 questions of MCQ were from C++,DS,OOPS,OS etc. i.e from the computer science fundamentals.
After this people 40 people got selected for interview round(4 tech round).
Round 2:
First the interviewer asked me to introduce myself. After that he asked me questions on my web development project which I have done through Django. So he asked me some questions on Django. After that he gave me 2 coding questions to write and 1 to just explain the algo.
- 2 coding questions which were given to write the code(only the function) are-
-
Reverse a Linked List in groups of given size
https://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/
-
Maximum profit by buying and selling a share at most once.
Apply maximum difference between two element algorithm to solve the problem.
Question which he asked me to explain the algo is:
In all the above program he asked about Time complexity.
Round 3:
He asked me to introduce myself and then he also introduced himself also. After that he gave me 2 coding questions .
-
Right view of binary tree.
At first I tried to do the above by the method below. https://www.geeksforgeeks.org/print-right-view-binary-tree-2/
but he aksed me to it some other way so I did it by level order traversal. https://www.geeksforgeeks.org/right-view-binary-tree-using-queue/
After that he asked me the time complexity of the above code.I said the correct answer but he asked me
are you sure two times. I said confidently yes. So sometime interviewer want to test your confidence ,at
that time you have to answer what is you think is correct don’t get confused always answer with
confidence. -
Given an array of size n and a number k, print the k numbers(belonging o array) in descending order of their occurrence in the array.
Ex: n=13 and k=3
array: 2,3,3,4,2,2,1,9,8,2,2,3,4
output:2 3 4
I tried to solve it through map first. He then asked to pause and ask me the implementation of map.
After that he asked me insertion and deletion time complexity in map in worst,best and average case.
He then asked me about worst time complexity of skewed bst. Then he asked me about the
implementation of unordered-map. Along with that he asked me about min heap,max heap etc.
He then came back to program and asked me if I have better approach I told him a process through
sorting but he was not satisfied. So he ultimately asked me to write the code by using map only and also
asked me about the time complexity of the code.
In this round interviewer has grilled me alot about stl,their implementation along with time complexity
in case of insertion as well as deletion.
Round 4:
This round consist of 2 coding questions along with questions from OS,OOPS and DBMS.
The coding questions were not direct. He gave me some situation which I have to first interprit that how to solve and the write the codes.
- First situation was related to sequential execution of job, which can be solved by directed cyclic graph problem.
- Second situation was related to least common ancestor of binary tree.
At first I gave the solution in which we have to traverse tree twice. He asked me to come up with better
solution So I explained him the solution using single travesal. He then asked me to write the code for
that single travesal. Time complexity was asked in the above codes.
After this he asked me to write various questions on OS,OOPS and DBMS:
- process scheduling.(FCFS,RR,preemtive etc.)
- process synchronization.
- Deadlock in OS, Semaphores etc.
- Page fault and different page fault algorithm.
- Paging,framing etc.
- ACID properties and explain them with examples in DBMS, how can consistency be maintained etc.
- SQL queries.
- Inheritence.
Round 5:(HR Round+Tech)
He was very senior. At first he asked me to introduce myself and that he asked me 3 behavioural
questions :
- Have you faced any project challenge till now? If yes then explain how did you overcome it.
- Have you done something out of scope in your studies?
- Have you done anything out of your comfort zone in college?
After this he gave me 1 question similar to weighted job scheduling. Not exactly similar. i.e I have to find
the jobs which are conflicting.At first I gave him O(n2) approach but he asked me to give more good solution.
So I solved with O(nlogn) time complexity.
The most important thing in the interview process is:
- Knowledge on everything mentioned in your CV.
- loudthinking.
- Confidence along with capability to solve problem differently.
- Good knowledge on DS and Algo,OS,OOPS,DBMS etc.
"