The most likely problem is simply that you are getting questions wrong, but you don't realize it. Companies don't often give candidates whiteboard questions, have the candidates nail those whiteboard questions, and then drop the applicants.
The most likely problem is simply that you are getting questions wrong, but you don't realize it. Companies don't often give candidates whiteboard questions, have the candidates nail those whiteboard questions, and then drop the applicants.
Looking at your profile, you seem well suited to be able to evaluate this, so let me give an example from an interview I just had.
Here's a problem and solution from the last interview I had: https://pastebin.com/LyVYqLv4
Would you mind emailing me whatever resume-ish stuff you have at my hn username at gmail? Maybe I can give more specific help.
`biggestSize = 99999999 #MaxInt` This is returned if the caller passes you 0 for slicesToFind, so you're returning a nonsense value in that case. Either raise an exception (preferred as it catches errors fast) or return None.
`def area(size)` You're using pi r^2, so size is a radius, but it seems you call it with a diameter. This is why choosing distinct names is very important.
`newSize = (originalSize / newSlicesInCake)` Again, using "size" all over the place is confusing. I'd write something like `new_slice_area = (original_cake_area / new_slice_count)`.
As far as 0 input, they actually told me it would always be valid so edge cases were not accounted for.
But, yeah. Casing convention was surprisingly important in one of my interviews. They wanted to know that I was able to adapt to a new language as the job was for a language I didn't have on my resume. It's weird, but I understand where they're coming from. Seeing improper styling in a code review is an immediate red flag and an interview problem is ultimately a code review.
Here's some discussion on it https://leetcode.com/discuss/interview-question/348510/Googl...
Companies are all over the place all the time. And I have seen this from both sides of the isle.
For example, at one company I was at, we said we were hiring for a full stack position, and we had a candidate come in that did well on all the questions, but then afterwords, we decided that we actually wanted a dedicated front end engineer. So no job for them!
It was no fault of the candidate. We just didn't know what we're were doing and screwed up by interviewing someone who was better suited for a different position.
Stuff like this happens all the time. Even if you blow the interview out of the water, there is still only like a 50/50 chance that you'll get the job, due to no fault of your own.