This is my set of resources and shortcuts for going through Data Structures and Algorithms.
You’ll find them well-compiled, and maybe not that expected.
Higher one are of higher priority. This will keep getting updated for sure, but do complete these. Please do go over STL first of all before moving on, cause doing everything from scratch, might be a great learning experience, but it’s stupidity, as you’ll take more time to grasp the same thing.
My approach of these are,
- for video tutorials, I follow along with the tutor, pausing if a question is revealed.
- for written tutorials, ideally you should first go through the entire article in one-go with a bird eye view. Then delve into those parts which would seem more relevant to you for now. As you can always come back to them later for more advanced concepts. Just try not getting stuck for long.
Some standard Resources I think are great and still left to follow
-
STL
-
Structures
- William Fiset : Collection of all data structures you need to know till an intermediate level. Explanation is extremely well done.
- MyCodeSchool : Not as exhaustive as above, but may suit your style. Emphasis given on particular topics.
-
Pointers
-
Linked List
-
Matrix
- Matrix Questions : Never hurts to know how matrices are manipulated in programming. This will make you better in handling limits in iterations.
-
Trees
- William Fiset : Extremely useful, intuitively explained, in pseudo-cum-python code.
-
Backtracking
-
Recursion
-
Dynamic Programming
-
Hash Tables
-
Graph Theory
-
Number Theory
-
Perfect Reference
A few points I would like to mention:
- Debugging:
Throwing Exceptions can be useful, or using debuggers.
A good ol’ print statement is always the master weapon in debugging. If you do write a lot of print statements for cleaning up your code, these constitute of code too, so instead of removing them when you’re done or commenting them out, use conditionals. Example:
const int debugging = true;
#define deb(x) \
if(debugging) \
std::cout << #x << " : " << x; \
-
Keep your env clean. Use Zen Mode if you have dual monitors, else hide out all bars in your text editor. This will keep you focussed more than you would be, and you’ll appreciate the look too.
-
First and foremost, go through the STL Blog, or my GitHub repo summarizing and enhancing that. I learnt a lot there.
Macros will save you huge time. Build your own macro for showing one variable, two variable, and any STL container’s contents. Use debugging bool. Keep a .hpp file saved somewhere, containing all your macros. I have uploaded mine, check that out. If you plan to use that in CP, I recommend making a initiator template, containing all these macros.
-
Do install Kite. It’s extremely useful if you hate googling for every small stuff you don’t remember. I know your pain.
-
Go through all Data Structures and DP next. Then graph specific algorithms. This covers upto Level C in a SRM in CP contests.