Training for code interviews
Coding interviews are mainstream for engineering jobs but interestingly enough these coding interviews are not always required:
- As a new grad, I had a few offers from companies without doing any technical assessments (I only did hiring manager interviews).
- As a senior engineer, coding interviews are often skipped if my application is done through a referral from a previous coworker (though in general I still have design, cross functional, hiring manager and other interviews)
From different discussions with colleagues, my experience as a new grad was unusual and likely a combination of a few factors:
- I graduated from very good schools
- All these offers were outside the US (in Europe or Asia)
- Job market for software engineers was hot at that time
With that being said, I’m not sure this is something that can still happen because of the job market (but if it happened to you, I would be curious to know). So you likely have to prepare for these interviews.
Preparing for coding interviews is a heavily discussed topic – and sadly heavily monetized in my opinion. Here’s my (hot?) take: you don’t need to do thousands of leetcode or hackerrank questions or pay hundreds of dollars to get some training. For coding interviews the main expectation is that you can write code, so doing the easy leetcode questions is enough:
- You should be able to write valid code on your first try – as in you should know how to create a list, for loop, hashmap etc. without needing a few attempts
- You should know the standard structures available in the language of your choice – list, hash map, sets etc.
And that’s about it. I don’t think you need either need to:
- Know mathematics tricks – e.g. how to find the redundant number in a sorted list in linear time with O(1) memory
- Know weird data structures – e.g. if an interviewer expects you to know finger trees to join their company, you probably should consider another one.
It’s maybe useful to know that some algorithm exists and how good they can be (e.g. knowing that you can find the median in linear time is good and enough – even if you don’t remember how to implement it) but that’s optional in my opinion.
Expecting candidates to know exotic data structures provides no signal on how good the candidate once hired – it just reflects badly on the interviewer/company. I always thought it was a way for interviewers to flex on their dominant position.