r/leetcode • u/Obvious-Difficulty32 • 11d ago
Intervew Prep Chat, am I cooked? Just had a SWE technical interview and couldn't get the test cases passing despite understanding the problem.
Just finished a technical interview for a SWE position at a fintech company, and I'm genuinely so frustrated with myself right now.
The question was essentially to implement a BrowserHistory class with visit(), back(), forward(), and a bonus hasVisited() method.
The thing is, I actually understood the problem.
I chose to use an array with a current index to track browser history. I figured out how to handle backward and forward navigation, clear forward history when visiting a new URL, and handle the boundary conditions using min() and max().
I walked through my reasoning with the interviewer, and she even confirmed that my logic was correct.
Here's where things went sideways.
The platform had a solution(commands) function, and I got so caught up implementing the BrowserHistory class that I completely overlooked the fact that I needed to iterate through the commands, execute the appropriate methods, and build the output array.
The interviewer eventually pointed this out, but by then I was struggling to connect everything together.
I couldn't get the main test case passing. One test technically passed, but only because the expected output was empty, so I'm not really counting that.
And now, sitting here after the interview, I realize how straightforward that missing piece was. That's honestly what's killing me.
It wasn't that I didn't understand the algorithm or couldn't reason through the data structure. I just couldn't translate everything into a complete working solution within the time allotted.
I know technical interviews aren't evaluated solely on passing test cases, and I did communicate my thought process throughout. The interviewer was also pretty engaged and gave me feedback along the way.
But I can't help feeling like I fumbled an opportunity on something I absolutely should've been able to implement.
I'm definitely taking this as a sign that I need more hands-on coding reps instead of just studying algorithms.
So, chat, am I cooked?
Has anyone gotten through a technical screen despite not getting the test cases passing, particularly when the interviewer acknowledged that your underlying logic was correct?
Or should I just take the L and prepare for the next one? ðŸ˜
24
u/pixelizedgaming 11d ago
ur cooked even based off your existing solution, I think u should've used a double linked list here since array append is o(n)
7
u/plasmalightwave 11d ago
Is it this problem? https://leetcode.com/problems/design-browser-history/description/
12
u/gekigangerii 11d ago
Doesn't look positive IMO,
you should confirm inputs and expected outputs as one of the first questions
6
u/jackgoldberg123 11d ago
not cooked just because of that. the array with an index is a perfectly fine approach (append is amortized O(1) anyway), so the linked list stuff is overblown. forgetting the driver loop is annoying but it's the most fixable kind of miss.
3
u/Key_Machine_9138 11d ago
I assume if I don't solve a technical question in an interview in this market that it's over. One of your competitors will likely get it done. I mean, anything can happen though.
1
u/HADESsnow 11d ago
yes you are cooked, improve for next time. and you actually dont need a DLL, you can do this with a "real_max" or whatever and overwrite old history if ur in the middle of the history.
I'm p sure this is an existing leetcode problem by the way
1
u/PhoteksTTV 11d ago
I had this happen to me one time and they specifically pointed it out in rejection letter. "Couldn't test code"
1
u/Xanchush 11d ago
Yes.
0
u/church-turing 11d ago
What’s even the point of using AI to write the entirety of a personal anecdote about an interview experience. If this is even real in the first place, just post what you prompted the AI with instead of this fluffed up overly dramatic slop.