They asked 2 questions, the first one was quite simple, the second was medium but required for a person to write 200 lines of code minimum to get it done (200 lines is what am picking from people's comments on the question)
First question: GIven a sorted Array [1,3,5,7] find [1,6) find number of values within that range 1 is inclusive 6 is exclusive. Wrote implementation for this (Used <= binary search variant this resulted in large number of edge cases, then after a hint used >= binary search variant which led to three edge cases took 15 mins) (this was my bad)
Follow Up Question: If there are duplicate values then how would you solve it : Write implementation for that. (So wrote that implementation took 2 mins)
Then edge cases to rectify question further 2-4 edge cases more(took 5-8 mins more). Once we were done with this, it was 25 mins into the interview.
Interviewer asked another question: https://www.hackerrank.com/challenges/crossword-puzzle/problem this is hacker rank medium, easy to come up from an algorithm standpoint but tedious to write within 20 mins and come up with a workable solution.
I felt like I am interviewing with someone who did not try to write the solution for all the above three questions within 45 mins or I don't know may be my speed is slow or may be am not good at it. I would like to open this to the experienced/seasoned leetcoders. I would like to know how to prepare for these type of interviews.
Do you guys think it is reasonable to solve three questions within 45 mins? Or I don't know these kind of experiences really shatters my confidence or it's foolish to think about these and let them be.
P.S.: I know this feels more like a rant and not a question to the folks, but am more than willing to hear your opinion on it. We are all either Engineers or to be Engineers, Does anyone feel reasonable to ask these many questions when they are interviewing someone for a role on their team? If so why do they feel it's correct to ask that many questions. What are we possibly trying to judge is what I would like to understand.