Tech Interview Handbook
930 subscribers
2 photos
9 links
Official channel for techinterviewhandbook.org. Follow to receive news and updates about the website!
Download Telegram
Channel created
Channel photo updated
We revamped our resume guide - it now has step-by-step instructions on how to prepare a FAANG-ready resume!

1. Set up your ATS-proof resume template
2. Write effective resume content
3. Optimize your resume
4. Use free tools to review your resume

Check it out - https://www.techinterviewhandbook.org/resume/guide
After doing over 500 LeetCode questions and having interviewed hundreds of candidates, we have gathered a bunch of useful LeetCode tips. Here they are:
1. Revise your CS fundamentals before your start LeetCoding. You don't have to spend that much time studying, but you need to know the advantages of each data structure and when to use which for the question.
2. The average question difficulty you'll get is Medium. Start with Easy questions, do more of them, move on to Medium questions. You probably won't be asked Hard questions in real interviews but you should do some famous Hard questions like Word ladder, serialize/deserialize Binary tree and trapping rain water. You should not be practicing only Easy questions.
3. LeetCode is not fully representative of real interviews. In real interviews, you don't get long descriptions nor do you get so many test cases. Questions in interviews are intentionally vague and underspecified, you have to clarify the requirements. You will also not be given input ranges during interviews.
4. To better simulate interview conditions, come up with a solution in your mind and be sure of the time and space complexity before you start to code. Trial and error-ing during the interview is not seen as a positive signal. As a good habit I write the time and space complexity of my solution as a comment above my solution.
5. If you find yourself stuck after half an hour on a question. Determine if you are close enough to cracking it. If you're close, try for a while longer. Otherwise read the solutions and move on. Learn the technique that was crucial to solving the question and internalize it. Revisit in a few day's time and try to solve it without referring to the answer this time. LeetCode also shows you similar questions for a problem. To test if you have understood the concepts, try the similar questions and see if you can solve them.
6. You might not get to run your code during interviews. Interviewers aren't just evaluating how correct your code is, the signals you exhibit during the process matters as well. You can end up failing even though you wrote correct code but it's messy and not readable. You can also end up passing even if your code had a minor mistake but your code is super clean and well-structured. Getting an Accepted doesn't mean you did well if you only got it on your tenth attempt. Before hitting the submit button, scrutinize your solution hard. Come up with test cases, standard ones, edge cases, think whether your code will pass those cases. You can run your code against your own test cases, it's still better than hitting the submit button. Just note that you might not get to do that during interviews.
7. Some topics are more important than the others. DFS, BFS, binary search, trees, graphs are the most important and common ones. If you're going for Google, practice DP. If you suck at DP like me, at least be good at backtracking with memoization.
8. The chosen language doesn't matter as much as your mastery of the language. You don't have to pick up Python just because it's the best language for interviews. But if you have enough time (more than two months), it might be worth doing so.
9. You don't need to practice too many questions. 100-200 is sufficient for most. After a while, the questions are variations of previous questions and are based off the same patterns. The returns on practicing above 300 questions is marginal at best. The full list of 169 questions in Grind 75 (https://grind75.com) is 90% of what you need.
10. LeetCoding is a marathon, not a sprint. If you start too early, you run out of steam. Start too late and there's not enough time for spaced repetition to take effect. Recommend starting a few months in advance and spending 1hr a day doing a few questions per day. You should be in top shape when it's time for interviews. If you've completed all recommended practice questions, do the weekly contests. If you can solve at least 3 of them, you should be ready for interviews.
11. You might never feel ready for interviews and that's perfectly normal. Interviewing is a numbers game. Interview performance is a function of luck and preparation. The more you prepare, the "luckier" you get. You will fail some and you will pass some. You just need to pass one.