First round: Online aptitude and 2 basic coding questions (based on the reverse number) on 19 Sept at 5.30 PM, Platform – wheebox. Then by our T&P department, I got to know that I was selected for the technical interview.
Interview scheduled on 20 Sept at 4.40 PM.
Interview:
Greetings.
Introduce yourself.
What is class :
Tell me about OOPS.
I answered all building blocks of OOPS with examples.
Give me one real-time example of polymorphism.
Why have you chosen to react over angular (as I mentioned my projects are in reactJS ). see ans
Difference between SLL and DLL?
Difference between Array and SLL?
Tell me if the following code will run or not and tell me the reason. (assume necessary functions like println() …etc)
Java
I told him that the program causes an error because parent class reference can hold the object of the child known as run time polymorphism (late binding) but not vice-versa.
Write the program for bubble sort.
I wrote code and tries to run the code he said don’t require to run the code just write logic.
Write the program to find the second largest element from an array.
I sorted the array using STL (I asked for should I use STL or not ) and printed the second largest element –> O(nlogn) solution
If you got this question in an interview then give O(n) solution see.
Write the code to find the missing number from the continuous array.
I told the logic to sum the total elements of the array and sum the total numbers from 1 to a greater number of that array or range of that array elements.
He wants to know how I apply logic to that program then, instead of using for loop I used a formula for the summation of n terms. i.e summation =n * (n+1) /2
then subtract both the results. we got the answer. see solution
He asked me do you know the logic for factorial “I said Yes” and then he told me to write a program for factorial in recursive.
I answered this question. see
Tell me about the types of trees, and what is BST.
I answered this question.
Write a program to find the height of a tree
I answered this question, see the solution
Tell me what is joining.
Write a query to find the second largest salary among the employee department.