Are the expectations too high or these question my coding skills?
Google L4 role. My phone round feedback was "strong hire." Post that, First round, I quickly solved a question and a follow-up. Later, another follow-up was asked where I wanted to use a sliding window approach. I proposed a for loop with an internal while loop, but the interviewer expected me to use two pointers and an if loop. He said a sliding window cannot have a while inside, and I finally agreed to use two pointers. While coding, he said he knew I could write the code and would convey the same, though I clearly stated I would finish coding. leaning towards L3. Second, I quickly provided a solution. The interviewer asked if it was the most optimized solution, and I said yes. He kept pestering, so I took 2-3 minutes and confirmed it was optimal. He agreed and asked me to proceed with coding. I asked if there was a follow-up, and he said he couldn't say. Then he gave me inputs one by one. The third input was an edge case, which I realized myself and modified the solution accordingly. He asked a follow-up with 13 minutes to spare; we discussed the approach, and he said that was the right direction and stopped the interview. Result: leaning no hire. Third, I gave the DS immediately, list in the map’s value; he asked why an integer wouldn't be sufficient. I explained that if we need the data again, since we're getting the stream inputs from the API, a list would enable us to reuse those values. I also said that, in this use case, an integer would be sufficient and proceeded with the code. He asked a follow-up, and I was trying to optimize my approach because it required checking the list’s last two elements every time in the map for a key, and also going through the entire hashmap again to check the last value of the list (timestamp). The interviewer wasn’t happy with the optimization where I wanted to remove used elements to avoid repeatedly checking and optimize the searching again. In feedback, it was he provided me help with DS, which was untrue. Leaning no hire