DSA · written course
Why your program is slow, and what to do about it
From your first line of code to a queue you built yourself.
Start reading32 pages · about 178 minutes
By the end of this course
Not a list of data structures to memorise: a way of deciding. By the end you can look at a loop and say how it will behave on a million items, choose between an array and a hash map for a reason you can defend, and read the complexity table in an interview question rather than guessing at it.
All 32 pages
- 1The program that worked until it did not5 min read
- 2Counting without a stopwatch6 min read
- 3The other resource5 min read
- 4Arrays, and why index 0 is instant5 min read
- 5Answering range questions in one step5 min read
- 6Strings are arrays with sharp edges5 min read
- 7Searching: from every item to twenty5 min read
- 8Binary search when the target is not there6 min read
- 9Sorting, and why some ways are hopeless6 min read
- 10Three sorts that matter, and why6 min read
- 11Splitting a problem in half5 min read
- 12Recursion, and the stack underneath it6 min read
- 13Trying everything, but not stupidly6 min read
- 14Linked lists: the opposite trade5 min read
- 15Stacks: last in, first out5 min read
- 16Queues: first in, first out5 min read
- 17Hash tables, and the trick from page one6 min read
- 18A tree shaped like a prefix5 min read
- 19When a list is the wrong shape6 min read
- 20A tree that keeps things in order6 min read
- 21When you only ever want the best one6 min read
- 22When anything can connect to anything6 min read
- 23Two ways to walk a graph6 min read
- 24Putting dependencies in order5 min read
- 25When the edges have weights6 min read
- 26Connecting everything as cheaply as possible5 min read
- 27Which things are connected5 min read
- 28Two indices instead of two loops6 min read
- 29Taking the best option now6 min read
- 30Working with the bits directly6 min read
- 31What to do when you have never seen it6 min read
- 32Choosing, which is the actual skill6 min read
Then what
Reading is the first half. When you finish, the questions for this subject test whether it went in, and every wrong option tells you why it was wrong rather than just that it was.
See the questions for DSA