I often struggle to come up with any kind of specific solution on the spot even if I can outline the general idea. I don't usually feel particularly nervous, so it is not that. Shortly after an interview ends, on my walk outside, I often have a breakthrough when the solution comes to me in a much greater detail, so that I can articulate it much better at least to myself.
I have also noticed that I can typically only solve Medium problems on LeetCode within an hour when left alone. Hard problems often take me a couple of hours at least.
The observations above make me think that maybe I'm slow and/or ill equipped when it comes to solving problems on the go. And certain types of problems are easier for me to solve in solitude.
Does anyone have any suggestions what I can do improve my onsite performance? I will of course keep on practicing, but certain opportunities are getting away from me.
that's not just you.
It's me and everyone else I know.
That's why these are called whiteboard firing squads.
The only way I know to improve on whiteboard interview performance is to do more whiteboard interviews unfortunately.
I know it does not make sense. I know it does not teach your or help you further any actual skill you will actually use day to day, but that's the problem we programmers have painted ourselves into.
The "remote" equivalent to whiteboard interviews are "live coding" sessions where you type code into a site like codebunk.io
Some random person who works at your potential employer will send you a link to a site you can type code into and ask you to solve a "5 minute problem". It's not fizzbuzz, it's not a for loop - it's going to be something slightly tricky like finding the sum of 3 numbers that add up to a specific number.
One thing I can recommend at a whiteboard firing squad is to see whether the firing squad has people in it that want you to win.
If you think out loud, show them you know what you're talking about, they might come out, feel your issue and work with you.
Isn't that the kind of people you want to work with regularly anyways?
I am happy to work out some trial whiteboard interviews with you if you feel that would help.
If you want to master it, I guess you need to buy a whiteboard, and have a programmer friend give you random problems on a timer.
Having said that, do you really wanna work at a company that does this? I would never ever go to FB again, and not just for the pathetic and horrendous things it does, but the interview process just feels like "ooh, i know this crappy thing that was taught in high school, which nobody actually uses/needs, and you don't".
Also, there seem to be several different types of whiteboard interview, a) the algorithmic solution, b) the conversation starter, and c) the problem analysis. I mention this so that you don't focus solely on the algorithmic type, the other two really are there to help interviewers know how you approach problems.