This was my first time giving an interview at google, I average around 280 problems solved in leetcode - mainly focusing on medium/hard. Got a call a month prior to the interview, asked for a month to brush up on leetcode.
Coming to the interview (45mins), there were no intros, I was directly asked to code up a solution to parse a given string and calculate the resultant value in Python:
This is the link to the problem
I took around 3-4 mins to figure out this is a recursive solution, explained to the interviewer that we can solve this using recursion, then took around 20 mins of rough working and then explained clearly that we have to first parse this string and we have to first split the string into an operation, a number and the string block next to the number, and then we recursively go into the block over and over again and calculate the the operation value until we are left with an operation and two numbers in the string. we do this until we are left with a number in the string.
I was taken aback by the complexity of this problem and even wondered how can someone even possibly code this solution out in 15 mins, but still I somehow managed to code up 90% of the problem statement asked and i clearly explained everything there was to it, the whole thought process and the interviewer was nodding at every step giving me a positive response, I just missed out on the edge cases and a default condition other than that, the entire recursion and the string parsing operation was spot on, i even verified this after the interview., and during the last 5 mins I was a bit off on the explanation of the dry run of the string parsing I messed up a bit while doing the dry run, but I quickly realised my error with the help of the interviewer and then correctly explained the dry run just at the end of the interview.
But, alas the very next day I was met with a rejection, I don't even know what to think of this whole experience, I then realised I wasted a whole month's worth of prep for nothing.
Please let me know if such questions are fair enough for a screening round or I am dumb lol