AI interview(total 8 ques): IT WAS NON ELIMINATORY
- asked intro
- project i worked on and issues faced
- encapsulation and inheritance. and where using more inheritance is problemetic
- then i was asked in my personal project where i faced issue while using more inheritance
- Process vs threads
- what sorting algo will you use if array is almost sorted. i answered insertion sort
- then i was real real scenario where I used insertion sort in a such a case where array is almost sorted
Technical round 1: ELIMINATORY
As usual, it started with introduction of both interviewer then mine.
- after that I was asked dsa question: no. of islands
- then i was asked a sql query: count all the employees from each department where salary >= 10000
- after that I was asked Normalization
- what is Foreign key
- clustering and non cluster index
- then asked some AI related questions(maybe coz my resume is more ai related)
- in ai, he asked what are tokens, rag, agents
Overall review of Technical round 1: it was pretty easy if you know basics then you're good to go
Technical round 2: ELIMINATORY
(Pen paper round)
This was the worst interview I ever gave.
- first I was asked that if I have any idea about OOP. So I explained everything like real-world modeling, objects, classes and 4 pillars.
- After that, he wrote a class A{getData()}
class B: extends class A{getData()}
He then asked what kind of polymorphism is being applied here.
After that he gave 4 examples where we were creating object. and asked for output
4 examples were:
Bb1 = new A();
Aa1 = new B();
Aa2 = new A();
Bb2 = new B();
EVERYTHING WAS SMOOTH AND EASY TILL NOW - Then we went on to DSA questions
- Ques1: you have to find the 3rd largest element in array.
- Ques 2: You are given 2 unsorted arrays, you have to return 2 arrays in sorted manner.
for eg: arr1: [1,9,3,6]
arr 2: [6,3,9,2,1]
answer: arr1: [1,1,2,3]
arr2: [3,6,6,9,9] - Ques 3: Balanced Parenthese
Seems easy, right?
But here's the plot twist:
-
Ques 1: I said we will use 3 variables to keep track of largest, 2ndlargest and 3rdlargest and this was we can do it in O(N) time and O(1) space if not considering input.
Then he said you have to do it by using 1 variable only due to space constraints. Then I asked him if we can just sort the array, he denied. I just cannot think of it, dk if we can do it like that or not, and then I came with a approach that we can use minHeap like we do for kth largest element. After explaining the approach, the interviewer said that this solution is okay, minHeap will take less space than 3 variables.
At this point I knew that I'm cooked. -
Ques 2: I gave a solution with very poor time complexity. Coz neither he allowed me to sort the arrays, nor he allowed me to use visited. He suggest 2 pointer, but I couldn't come up with it provided we cannot even sort the array, neither take any variable not even visited array. and you cannot even take answer vector, you have to do it inplace.
-
Ques 3: Most obvious solution is stack. He then said, you cannot use stack. I said ok, we will stimulate stack by keeping top. he denied that approach. then I said we will use nested loop. He said that's okay, plz write pseudocode. when i writing it so I used if condition for opening bracket considering we have only 3: (,{,[. he then said ki dont hardcode this condition coz what if we have 20+ types of bracket. then I said we can use vector or map to store it. then he said but this will increase the space. I couldn't solve this one then.
-
Now we moved on to SQL. it was simple that you had to count number of students in each department and we have student and department tables.
-
Then we moved on to resume based questions based on my experiences and some AI based questions coz my resume was AI heavy. I answered all the questions, infact even answered what was the dataset and what all things we did without even looking at code. obv coz this was pen paper round.
And the other interviewer was allowing candidates to use chatgpt in front of her to reach optimal solution.
Overall review of Technical round 2: worst interview experience.
verdict: rejected


