Cracking the Tech Interview: My LeetCode strategy
Heres how I prepare for tech interviews - my effective preparation blueprint
My partner and I are relocating closer to my partners extended family (yay!) but they are in a city with a smaller jobs market (boo!).
Ive kicked off the Job Hunt Process (tm) by applying for the most interesting/relevant/CV-safe roles that I can see - engineer based at *BIG TECH COMPANY* (remote) and I’m most of the way thru the interview process and so far so good - but phew requires 6 six interviews
Screening by HR
Data Structures and Algorithms interview
System Design Interview
Coding Interview
Tech Lead Interview
Behavioural Interview
Final Boss Interview (probably)
I think I went thru the 5 stages of grief when I realised there would be leetcode style coding interviews! 😅
I navigated Denial, Anger, Bargaining, Depression and finally Acceptance before signing up for leetcode and the leetcode interview crash course
I’m sure there are folks out there who could turn up and knock out a leetcode medium problem without any prep but thats not me. I get nervous in interviews (live coding while someone is watching me) and the structure for refreshing myself with the style thru the crash course helped me so much with my nerves and put in some structure in place for my prep
Run thru the crash course end to end - it focuses on the datastructures and then also some concepts (like sliding windows) which I had never heard of before
Then solve the leetcode problems with the specific datastructures in mind
Take it to my IDE and repeat - being comfortable in my IDE and exploring the variants of the common datastructures and datastructures
some Datastructures I know and use day-to-day (e.g. HashMaps), some Ive heard of and never used (e.g. Trie)
Look all the variants of each datastructure and memorize their space and time complexity
Id use a HashMap for O(1) puts and gets but its unordered
Id use a TreeMap if I needed a natural ordering on my collection but its a bit slower on insertions (log(n))
Id use a LinkedHashMap if I needed an insertion based ordering on my collection (e.g. solves for LRU Cache quite nicely out of the box)
80/20 - I focussed only on the most likely to be used DSA i.e. I skipped bitmasking/breadthfirst tree traversal etc etc
(this is a calculated bet)
I tried the Cracking the coding interview book - I’m sure its great but it wasnt for me - I just bounced off it straight away- having the leetcode and my IDE open side by side worked best for me and is consistent with how the interview is run
I initially tried solving random leetcode problems by themselves but this didnt work - theres no structure each question - i.e. I think you’re setup best for success if you follow the course which talks to the each datastructure and walks you thru how to solve a problem with it and then you tackle a few questions for each datastructure/algo in mind - not just working on random leetcode questions.
Paying for the leetcode subscription/course was a nobrainer for the time it saved me. I generally have an hour or two (max!) in the evening to work on this - I need to speedrun. With hindsight it seems like an obvious decision but it took me a while to get there!
LeetCode System Design for Interviews and Beyond - I also signed up for - I struggled with consuming this one end to end.
I think a combination of the Authors accent and its being lots of videos (and the videos are a bit boring for me, I prefer to read and re-read text and pictures). However it is a comprehensive course and I recommend it for the structure/rigour.
What worked best for me was to
Jump to the practice scenarios at the end and work my way thru them and fail on stuff
Go through all the lessons and copy the high level bullet points into a google doc
Go back thru the practice scenarios and apply all the possible combinations of NFRs e.g. how would I make the DB highly available for reads / now for writes etc etc
Rinse and repeat till Ive internalised all the NFRs
I’m exposed to System Design day in and day out at work. The course is great that it has the structure and more generalised answers e.g. I work alot with Kong Gateway as an api gateway - and the course spells out the general usecases an API Gateway solves for.
Other thoughts:
I knew the coding interviews might focus on concurrency and threading and felt this was a weakness as not in my day to day so I also signed up for Java Multithreading, Concurrency & Performance Optimization
I found this first course handy for the underlying Threading/Concurrency fundamentals - the gap for me was the author doesn't touch on the latest Java libraries e.g. CompletableFutures so I also signed up for Multithreading,Parallel & Asynchronous Coding in Modern Java
This second course is okay for quick exposure to hands on java libraries e.g. CompletableFutures/Streams APIs and the history thru Java
I was the most motivated when I applied for actual jobs and knew I had a specific deadline for the tech interview that I could work towards. Ithen treated the whole process as a mini-project that I tackle consistently for a small block each night has been the best way to grind / prep / internalize everything 🚀


tech interview are so intimidating! love this