I have given many interviews and, based on THAT, THIS IS WHAT I OBSERVERED.
It depends upon your interviewer or we can say luck
This is a story about a company but I am not going to write the company's names that it was Intuit, where I was interviewed for around 2 hours. I answered all the questions, but still rejected with no feedback.
All other selected candidates gave interviews for less than 40 minutes.
The second story is about another company. In the last round, only 3 candidates were selected. I was one of them. My interview was scheduled end. Before other two were already selected (question asked to them was: TC of sorting algo, heaps, graphing techniques etc, and some oops theory question, it was a 30 minute interview). I was called, and guess what, I was asked to solve nearly 30 aptitude questions, 10 puzzles. It started at 3pm offline, then motion in a plane question (I remember this question from JEE times, but I messed up, and at the end I. formed two equations, and said, We need to solve this equstion , we will get the values, I checked time and it was 5: 15 pm). And the result was rejection. I had assumed it, as they only wanted to select two candidates, why they needed to waste my time? It was offline interview. I missed another OA because of that.
Another story, but this time it didn't take 2 hours, it was a 15 minute rejection. It was also a offline interview. It was a final coding round like always. He asked me to change an array to BST. I wrote the code, it was offline, so wrote it on pen and paper, and he told me to explain why 5 is the left side of 6, and 9 is right of 6. I explained it as BST me to rule hota hi, ki left one is smaller and right one is greater than root, and he said no, this is not BST, then said okay, and wrap it up. I was so confused. It was scheduled for 40 minutes.
I have a few more stories like that. I will write them in another post if you want. I learnt a lot from all these rejection. All those were such stupid rejection, but still rejection is rejection....ALso, if you think that, at any point, how should I answer the question to avoid these rejections, then give me suggestions too.
What I have learnt so far is, your knowledge is essential, but if you are destined to be rejected, the interviewer is going to reject you.