My Notes On SWE Technical Coding Interviews
Resources
- AusDevs Wiki: Interviewing Resources
- I actually help maintain this wiki. We aim to make it a great meta-resource!
- Tech Interview Handbook: Coding interview preparation
Some General Tips
- In my experience, recruiters can tell you the interview will be in a certain format, but the actual interviewer may give you something different. Be prepared for it!
- For one interview, I was given a Microsoft Teams and a Codility link well in advance, in the email the recruiters/schedulers sent to confirm my interview time. I emailed back to ask if I am required to screen share, and I got a response back that I will not be screen sharing during the interview. When it came down to the interview, I joined the Teams call and the interviewer asked me to screen share and open an IDE. My recommendation is to always prepare your IDE and screen just in case.
- Also be prepared for entirely different formats. You often hear about coding interviews focused on one question. However, some technical interviews in my experience may also be multiple smaller/easier questions, or you may not have enough time to go through the same rigorous discussion as you’d expect. Always ask about the format/expectations of the interview early on, and be prepared to adapt to it.
- Expect to possibly be quizzed on various technical things, likely directly relevant for the role (e.g. if it’s a role involving Kubernetes, you may get quizzed on Kubernetes). For backend roles, I’ve also been asked about basic programming concepts (e.g. pass by value vs. pass by reference), OOP, and concurrency.
- In my experience, interviewers may ask technical questions specific to your resume. These interviewers specifically tell me they’re looking at my resume and noticed specific technologies or areas of work that they want to quiz me on. For example, I have included Kubernetes, Docker, and Golang in my resume, which have been of particular interest to interviewers (possibly since they’re rarer and more sought-after skills).
Checklist for the days before the interview
- Know how you can introduce yourself.
- Have some questions prepared to ask at the end.
- Look or ask around for what to expect out of the interview.
- Maybe some of your friends have done it already?
- Maybe the format will be similar to last year’s interviews?
Checklist for the hour before the interview
Technical stuff:
- Be presentable!
- Dress well!
- Shave if you need to.
- Clean glasses?
- Video conferencing setup is ready
- If it’s a Teams interview, open the Teams link and set the camera, microphone, and headphones.
- Optionally, set up something like Nvidia Broadcast.
- Optionally, set up your lighting so that you’re well lit for the camera.
- Prepare OBS and set up a full display capture scene just in case you need to use Virtual Camera.
- This is because in my experience, the video conferencing software used may have issues with screen sharing. OBS Virtual camera was how I solved it.
- Depending on the coding interview platform, you might want to set up an account.
- Also see if there are more settings you can set up.
- Always have your development environment/IDE ready to screen share. Do this even if you were told you don’t need it.
- Open Microsoft Paint so you can scribble diagrams.
- Open another browser tab, ready to look up language documentation.
- Optionally, also open up this page!
- Optionally, also open up one of my language cheatsheets!
- Fill up your water bottle!
- Try to use the bathroom so you’re not uncomfortable.
Behavioural stuff:
- Be comfortable with your self-introduction.
- Be comfortable with the questions you will ask at the end.
Summary of General Tips For Coding
General flow:
- Ask about the format/expectations of the interview.
- How many questions?
- How much time do you have?
- Clarify the question.
- Paraphrase/repeat the question back.
- Clarify what inputs you have.
- Clarify assumptions.
- Also consider input format. (Negatives? Floats? Nulls? Empty? Duplicates?)
- Ask about input range.
- Work through some simple examples.
- Discuss approaches.
- Identify and explain them at a high-level.
- Tradeoffs?
- Time/space complexity?
- Consider:
- Visualizing/Drawing
- Solving by hand.
- Come up with more examples.
- Decompose the problem! (E.g. a grouping step? A hash function?)
- Identify and explain them at a high-level.
- Optimize the chosen approach.
- Different data structures?
- In-place modifications?
- Write code while talking through it.
- Point out any corner-cutting (such as use of
.split()
rather than regex).
- Point out any corner-cutting (such as use of
- Write test cases.
- Edge cases!
- Worst case time/space performance!
- Implement some improvements?
- (Also refer to STEP 3)
- Refactor redundant work?
- Early termination?
- Revisit time/space complexity.
- Discuss more improvements that you could do if you had time.
- Revisit tradeoffs?
Common Design Approaches
(TODO: I should write this out!)
Word Bank
It can be easy to forget the names very trivial things sometimes, even if you’re comfortable using the concepts intuitively. I’m perhaps more comfortable than most when it comes to data structures and algorithms, but here are the things that I still need to be reminded of the names for:
- Graph data structures:
- Adjacency List:
[[2], [2], [0,1]]
- Adjacency Matrix
[[0,0,1], [0,0,1], [1,1,0]]
- Adjacency List:
- BST traversals:
- Preorder: node ➔ left ➔ right
- Inorder: left ➔ node ➔ right
- Postorder: left ➔ right ➔ node
- Level Order: BFS.
Code Template
If you’re coding locally, here’s what I start with:
#!/usr/bin/env python3
"""
"""
def run():
print()
run()