This is my hands-on approach to hacking the Coding Interview:
- Tracking coding time with Wakatime or Git. (What you can't measure, you can't improve)
- Solve coding problems on a daily basis and
commit
every problem (min 30m/day) - Read technical books, and reimplement key data structures and algorithms in a high-level language such as
python
and when needed in a low-level one likec
- Take notes, make videos, or in-depth tutorials, teaching is one of the best ways to learn
- Give back to the open source community, helping projects is a great way to test your knowledge in the wild. Start with Exercism's tracks, FreeCodeCamp's curriculum, CodeCrafters's projects, CodeAcademy's docs, or even this repo. πβ
βοΈ
Optional: Enhance your learning abilities
-
Thinking, Fast and Slow by Daniel Kahneman
- Explores two systems of thinking: fast (intuitive) and slow (deliberative), revealing how they shape our judgments and decisions. Kahneman offers insights into avoiding cognitive biases and making better choices by understanding these mental processes.
-
Deep Work by Cal Newport
- Argues that the ability to focus without distraction on cognitively demanding tasks is increasingly valuable in our economy. Newport provides strategies for cultivating deep work habits to achieve focused success in a world full of shallow distractions.
-
Mindset: The New Psychology of Success by Carol S. Dweck
- Introduces the concept of "fixed" versus "growth" mindsets, demonstrating how believing in the potential to develop abilities leads to greater achievement and fulfillment. Dweck offers practical strategies for fostering a growth mindset in various life domains.
-
Ultralearning by Scott Young
- Presents a blueprint for aggressive self-directed learning, outlining nine principles of ultralearning illustrated through stories of remarkable achievements. Young shows how focused, intense, and strategic learning can lead to rapid skill acquisition.
-
The Art of Learning: An Inner Journey to Optimal Performance by Josh Waitzkin
- Drawing from his experiences as a chess prodigy and martial arts champion, Waitzkin shares insights on achieving peak performance through embracing challenges, maintaining a growth mindset, and developing resilience in any field.
-
A Mind for Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley
- Offers practical advice for succeeding in math and science, based on Oakley's personal journey of overcoming difficulties in these subjects. Covers effective study techniques, memory strategies, and the importance of practice in developing mathematical and scientific skills.
-
How We Learn: The Surprising Truth About When, Where, and Why It Happens by Benedict Carey
- Gets into cognitive science research to reveal the mechanics of learning, debunking common study myths and providing evidence-based techniques to enhance memory, understanding, and problem-solving skills.
-
The Art of Doing Science and Engineering: Learning to Learn by Richard Hamming
- A renowned mathematician and computer scientist shares insights into scientific and engineering discovery, emphasizing the crucial roles of curiosity, creativity, and persistence in tackling complex problems and making significant contributions to these fields.
So the first step will be doing the following exercises from these platforms:
- Khan Academy: Introductory exercises to get you started with the basics of algorithms. Great intro using Javascript & Python. The materials were developed by Dartmouth College professors Tom Cormen & Devin Balkcom, the first is the same author as the famous book Introduction to Algorithms.
- Exercism: Great open source platform to master any programming language itself, from the basics to advanced topics. Mentorship is free.
- HackerRank: They have Preparation Kits ranging from 1-week, 1-month to 3-months. Companies such as Amazon use the platform to interview candidates.
- LeetCode: Popular coding platform, the place-to-go to prepare for technical interviews. They just released a systematic program for excelling at interviews called 75.
- NeetCode: This is a new coding website based on a LeetCode problems selection. The cool thing is that they have code walkthroughs for each problem on Youtube and solutions in many languages. Great to match with LeetCode 75.
- Advent of Code: This is a yearly event that takes place in December. It's a great way to practice coding problems in a fun game.
- Coding Interview Prep: The Coding Interview Prep by freeCodeCamp contains hundreds of coding challenges that test your knowledge of algorithms, data structures, and mathematics.
- Deep-ML: This is an open-source machine learning challenge platform designed to help users improve their skills in algorithm development and AI applications.
- Tensor Puzzles: This is a collection of 21 tensor puzzles. Like chess puzzles these are not meant to simulate the complexity of a real program, but to practice in a simplified environment. Each puzzle asks you to reimplement one function in the NumPy standard library without magic.
Also consult Visualgo for visualizing data structures and algorithms through animation. Other great resources to consider are: High Load, The Euler Project (free), and Rosetta Code (free).
Platform | Track | Time | Problems |
---|---|---|---|
Khan Academy | Intro to algorithms | - | 25 |
Exercism | Python | 131 | |
HackerRank | Interview Prep Kit | 104 | |
LeetCode | 75 Study Plan | 75 | |
NeetCode | NeetCode | 1 | 150 |
Advent of Code | Yearly | 252 | |
Deep ML | Problems | - | 26 |
Tensor Puzzles | Problems | - | 21 |
If you're into reading very technical documents βhardcore modeβ you can check out the Python docs, C C23 Language Standard, and CUDA Programming Guide, or CUDA Best Practices. These resources are more advanced, but they're excellent for learning about the languages in depth, reimplementing some of the functions, and becoming very familiar with the core concepts from the very source.
Personally, what I did was to start brushing up on the basics of data structures and algorithms through easy reading Grokking Algorithms and Grokking Data Structures. Both are pretty updated books from last year, and I just wanted to get a bit more familiar with the ideas.
Arrays seems like the most fundamental data structure, so the first thing you should be able to do it's to work with that.
There are two types of arrays: static and dynamic. Static arrays have a fixed size, which means the size must be defined at compile time and cannot be changed during runtime. Dynamic arrays, on the other hand, can grow and shrink in size as needed during program execution. Understanding the difference between these two types is crucial for efficient memory management and performance optimization.
code/data_structures/arrays/dynamic.py
Lines 1 to 273 in 308bf91
Use Case: Static arrays are ideal when memory is constrained and the maximum size is known in advance, such as embedded systems or when implementing fixed-size buffers. The size limitation provides safety against buffer overflows.
Use Case: Dynamic arrays are ideal when the size of the data is unknown or changes frequently. This implementation shows how Python lists work under the hood, automatically resizing when capacity is reached.
Binary search is a divide-and-conquer algorithm with O(log n) complexity that finds elements in sorted arrays by repeatedly halving the search interval. It's a fast and efficient way to search for elements in large datasets, first or last occurrence, or even the closest element to a target value.
code/algorithms/binary_search.py
Lines 1 to 20 in e124e97