Some have mentioned stuff about resources for each topic I mentioned, and I think that's a good idea. Here's a rough dictionary for each mentioned topic: docs.google.com/document/d/1mKRZ743RBD9Ta4I5qNg3S6pO5ayVb2DH2YRCIB24_iM/edit?usp=sharing Note that it's a work in progress.
You had me at - I still make errors using Binary Search, even though it's an easy concept to learn and implement. I am glad I found your channel; it brings so much of human touch into the egoistical world of coding interviews and competitive programming, where I must be stupid that I keep making off-by-one errors is rampant.
Modular Arithmetics is needed to avoid overflows. It's used for hashing. It's used in all kinds of questions. Plus, it's easy to learn. I would have put it much higher.
Colin, could you make a video outlining general strategies and patterns on when to use which data structure? A lot of people (including me) struggle to recognize when to use a monotonic stack for example. Like, I understand we use it when the problem is reducible to finding the next greatest elements or the sliding window maximum, but what else?
At 35:50 Colin mentions that the implementation of two pointers can be tricky, especially if you're taught the wrong way. What is the wrong way? Does anyone have links to resources showing the right and wrong way?
@@fakedevdutt I would recommend learning a few things. First learn how to reverse a string using two pointers in java/c++. Then I would move onto just like a basic/general two pointers approach algorithm. Then I would solve two sum using two pointers. Then 3 sum using two pointers. I think this is an okay way to learn two pointers, but, I'd also just watch videos or just like literally reverse a string on paper using it and that should teach you it.
Depend also of what you want to program, in dsp fast fourrier and bitwise operation are very useful. Fourrier transformation is not so hard even if it seams. You take a number of sample, now you need to make complex number with it, for this you make a convolution multiplying those sample with sin and cos at certain frequency. then add those complex number and you know if a frequency close to the one tested is present in the signal. For Fast fourrier it's a little more complex but not so much, it's possible to bypass some of those multiply calculation..
I think Divide and Conquer should be higher, I've definitely seen it way more often than bitwise operations or game theory in interviews. Also, in my interviews with FAANG they seemed to not like Segment Tree as an approach when there was a simpler approach, eg they dismissed the solution outright (probably also because the interviewer themselves was not super familiar with the DS)
Can you make a video about mathematical subject to understand algorithm and data structure? And any advise for books to learn algorithm and data structure .
While I generally agree with you. I'm disappointed in your choice to drop FFT in F-tier without mentioning how immensely useful something like FFT is in reality. Anything these days to do with audio engineering likely uses FFT inside. Polynomial multiplication. Signal processing. It's honestly an incredibly vital and beautiful algorithm that isn't terribly hard to understand. I highly recommend anyone interested check it out.
saying FFT is F tier was pretty ridiculous. Dude doesn't know what time and frequency domain are and the multitude of cases when going between them is necessary
@@gregorymorse8423 In the beginning of the video, he stated that they would be ranked in terms of helpfulness for *coding interviews*. FFT probably isn't very important for that.
Yo, Colin you're a boss man! I think you should include Rabin Karp and rolling hash in here too. But that may already be a consequence of having KMP in there. Also could you rank minimax, and some more advanced trees like AVL, redblack, and Van Emde Boas trees. I've seen a comple minimax questions on LC
You didn't rate any techniques for fuzzy queries or estimation algorithms that are data science related. Stuff like cosine similarity, inverted index, entropy, some AI training algos like gradient descent, etc. 😂 I know it's a bit of an advanced topic for CS master students, but I think computing exact results is a lot easier than estimation techniques. So, estimations are actually a nice tool for solving hard problems like travelling salesman or face recognition. Prob out of scope for leet code questions, but yeah 😄
How on earth are divide and conquer algorithms d tier? Dynamic programming is definitely a superior to divide and conquer, but some of the most important problems in cs are solved via divide and conquer
I remember seeing a binary search video from your channel in my recommendation and I saved it for later, but now I am not able to find it. Did you delete it? If so, why?
Great video. But can you give an exhaustive resources for these topics particularly for the main one's which you feel are too necessary for interview and by exhaustive I Mean like totally full resource cause I wanna learn more and be like you. Thank You for your great content Keep up buddy
I have to disagree with the positioning of bitwise operations. It is not difficult and certainly not of you're able to think like a programmer should be able to, and it is indeed useful, though it may take experience to recognize when and where. When you do however, it can make a huge difference.
Any sort of dynamic signal analysis and control, you can use the fft and build filters in the frequency domain to control the output of a system. The fact that this man said fft is useless because you don't see it in interviews makes me think this man has never truly written any useful programs.
I use FFT driven software for analysis of machine vibrations literally ALL the time. Any time you have a signal in the time doman but would like to jump to easier frequency domain, it's literally a must. His dismissal of it made me very disappointed. But I think these are general thoughts on "learn coding".
@@vladimirleon2487 yeah I think its dumb is that typical algorithms courses spend more time on typical solutions, or I guess you could say "algorithmic" solutions to programming problems, when most people know that a lot of solutions to problems aren't traditional solutions. Most of the time, the most optimal solution is something very niche and untraditional like the quake algorithm. This is why I study Electrical engineering and not computer science.
For interviews, definitely an F. For competitive programming, they are very advanced, but also extremely powerful, so it depends. If you're anywhere below grandmaster, it's also an F, but if you're my level, it probably belongs in C-D (but it also depends on what you're training for; they'll be much more common for IOI-type stuff than CF).
If you don't know segment tree, you don't know bitwise operators, you DON'T even know brute force or any bit of combinatorics.... In short, no (unless you pour your entire lifetime's luck into codeforces contests).
Your list is meh (in my opinion) and may be very "competitive programming" oriented. I have never participated in any competitive programming tournament. I don't think prefix sum (which I have never heard of before this video) belongs to A. I also think "two-pointers" deserve much more love than you give it. Hash and linked list should be in "S", as I interpret "S" to be "if you don't know these things, don't even attempt technical interviews". Topological sort and Fenwick/Segment tree (never heard of that before) should be a rank lower (in my opinion). Anything in A and B should be known before interviews (after applying my mods). A few topic in C are definitely "good to have". Everything else is for the birds (if one's goal is to pass technical interviews)
fundamentally disagree. stack and recursion is tier S, and dfs is literally simplest apply of both recursion and stack, placing dfs in S and stack|recursion in B&C is soooo weird
also dfs is so much more useful than bfs, weird that they are combined. and also so many things not included like suffix array, comp. geometry (only convex hull), and many others (???) who did this tierlist lol
Why did you make this tier list for interviews? You have alot more knowledge about CP, and this video ended up being heavily biased towards CP. I think a tier list about interviews would be better made by an actual interviewer at a big company or someone with more experience in the market than you. Excuse my broken english lol
Some have mentioned stuff about resources for each topic I mentioned, and I think that's a good idea. Here's a rough dictionary for each mentioned topic: docs.google.com/document/d/1mKRZ743RBD9Ta4I5qNg3S6pO5ayVb2DH2YRCIB24_iM/edit?usp=sharing
Note that it's a work in progress.
You had me at - I still make errors using Binary Search, even though it's an easy concept to learn and implement.
I am glad I found your channel; it brings so much of human touch into the egoistical world of coding interviews and competitive programming, where I must be stupid that I keep making off-by-one errors is rampant.
Timestamps by tier
S tier
1:11 BFS / DFS
25:03 Sorting
A tier
2:44 Binary Search
7:47 Dynamic Programming
11:29 Greedy
12:31 Hashmap / Hashset
13:37 Heap
14:55 Linked List
19:22 Prefix Sums
27:39 Stack
32:17 Topological Sort
B tier
1:40 Binary Search Tree
4:07 Brute Force
8:52 Fenwick / Segment Tree
19:58 Prime Factorization
21:05 Queue
22:14 Recursion
28:47 String Hashing
35:26 Two Pointers
36:26 Union Find
C tier
3:15 Bitwise Operations
5:05 Combinatorics & Probability
10:05 Game Theory
14:01 Knuth-Morris-Pratt
16:00 Lowest Common Ancestor
18:22 Modular Arithmetic
23:38 Shortest Paths
33:50 Trie
D tier
5:54 Convex Hull
6:57 Divide and Conquer
17:26 Minimum Spanning Tree
26:14 Sqrt Decomposition
31:06 Strongly Connected Components
F tier
8:28 Fast Fourier Transform
17:04 Max Flow
Modular Arithmetics is needed to avoid overflows. It's used for hashing. It's used in all kinds of questions. Plus, it's easy to learn. I would have put it much higher.
as an amateur CP i love your content, always so insightful and interesting
A perf video summerizing almost all useful DS, Algos
The things you said about recursion were so ON POINT!!!
"I know it, but i don't". Mahnn it sucks!
In order to understand recursion you need to understand recursion
Colin, could you make a video outlining general strategies and patterns on when to use which data structure? A lot of people (including me) struggle to recognize when to use a monotonic stack for example. Like, I understand we use it when the problem is reducible to finding the next greatest elements or the sliding window maximum, but what else?
At 35:50 Colin mentions that the implementation of two pointers can be tricky, especially if you're taught the wrong way.
What is the wrong way? Does anyone have links to resources showing the right and wrong way?
phrased it perf! Im really worried cause I find two pointer hard I cant seem to identify the two pointer solution to problems!
@@fakedevdutt I would recommend learning a few things.
First learn how to reverse a string using two pointers in java/c++.
Then I would move onto just like a basic/general two pointers approach algorithm.
Then I would solve two sum using two pointers.
Then 3 sum using two pointers.
I think this is an okay way to learn two pointers, but, I'd also just watch videos or just like literally reverse a string on paper using it and that should teach you it.
Really cool to see new perspectives on things. Thanks for such a unique and interesting video!
Depend also of what you want to program, in dsp fast fourrier and bitwise operation are very useful.
Fourrier transformation is not so hard even if it seams. You take a number of sample, now you need to make complex number with it, for this you make a convolution multiplying those sample with sin and cos at certain frequency. then add those complex number and you know if a frequency close to the one tested is present in the signal. For Fast fourrier it's a little more complex but not so much, it's possible to bypass some of those multiply calculation..
I think Divide and Conquer should be higher, I've definitely seen it way more often than bitwise operations or game theory in interviews.
Also, in my interviews with FAANG they seemed to not like Segment Tree as an approach when there was a simpler approach, eg they dismissed the solution outright (probably also because the interviewer themselves was not super familiar with the DS)
I really hoped you would have put on screen the definition of the topics once introduced
Good point. I'll add a glossary (soon). Check the pinned comment in a day or so, and/or remind me if it's not there.
When you said about subarrays at 19:50 , my first thought is usally sliding window not prefix sum :/
hands movements are great!!!
Can you make a video about mathematical subject to understand algorithm and data structure? And any advise for books to learn algorithm and data structure .
Amazing content idea
Where would you put Backtracking?
brute force and recursion are both in B
I think I would prefer if you ranked just purely off of usefulness for coding interviews rather than factoring in being easy to learn
why are you ranking on how hard it is? you should be ranking on usefulness
you can't just put both of my most favorite algorithm in the F tier list
While I generally agree with you. I'm disappointed in your choice to drop FFT in F-tier without mentioning how immensely useful something like FFT is in reality. Anything these days to do with audio engineering likely uses FFT inside. Polynomial multiplication. Signal processing. It's honestly an incredibly vital and beautiful algorithm that isn't terribly hard to understand. I highly recommend anyone interested check it out.
saying FFT is F tier was pretty ridiculous. Dude doesn't know what time and frequency domain are and the multitude of cases when going between them is necessary
@@gregorymorse8423 In the beginning of the video, he stated that they would be ranked in terms of helpfulness for *coding interviews*. FFT probably isn't very important for that.
@@user-dh8oi2mk4f if the company does signal processing, then it might be the most important question. Just depends on the specific sector
Too niche
Really nice video! Going to come back to this one day xd
Great video. Subscribed
Yo, Colin you're a boss man! I think you should include Rabin Karp and rolling hash in here too. But that may already be a consequence of having KMP in there. Also could you rank minimax, and some more advanced trees like AVL, redblack, and Van Emde Boas trees. I've seen a comple minimax questions on LC
You didn't rate any techniques for fuzzy queries or estimation algorithms that are data science related. Stuff like cosine similarity, inverted index, entropy, some AI training algos like gradient descent, etc. 😂
I know it's a bit of an advanced topic for CS master students, but I think computing exact results is a lot easier than estimation techniques. So, estimations are actually a nice tool for solving hard problems like travelling salesman or face recognition. Prob out of scope for leet code questions, but yeah 😄
How on earth are divide and conquer algorithms d tier? Dynamic programming is definitely a superior to divide and conquer, but some of the most important problems in cs are solved via divide and conquer
does this tier list also work for competitive programming ? thanks
-You may be confused about [...]
-Yes
FFT is the most useful algorithm ever anything involving periodic signals will use FFT it should easily have its own S+ tier.
Yep :]
Fast Fourier Transform is very useful in DSP, but not in DSA. It should get S but it also shouldn't be in this video.
what the fuck is DSP
@@caiodavi9829 Digital Signal Processing. It's an Electrical Engineering thing mostly, I think.
Colin i love your videos!!
Did you just call fft an f? Imo the rest of this list is null bc of that.
Petition to put DP at S tier. Come on man, it deserves it
I remember seeing a binary search video from your channel in my recommendation and I saved it for later, but now I am not able to find it.
Did you delete it? If so, why?
Great video. But can you give an exhaustive resources for these topics particularly for the main one's which you feel are too necessary for interview and by exhaustive I Mean like totally full resource cause I wanna learn more and be like you. Thank You for your great content Keep up buddy
Binary Search not in S Tier. Um Nik is not happy
Is there a video on how he went from knowing none of these topics to being an international grandmaster ?
I have to disagree with the positioning of bitwise operations. It is not difficult and certainly not of you're able to think like a programmer should be able to, and it is indeed useful, though it may take experience to recognize when and where. When you do however, it can make a huge difference.
nice vid! would've been cool if you gave a TLDR about the topics :)
Good point. I'll add a glossary (soon). Check the pinned comment in a day or so, and/or remind me if it's not there.
What is FFT used for? I've only ever heard of it used for digital signal processing for audio
rf applications (radar, cell, radio), image processing
Any sort of dynamic signal analysis and control, you can use the fft and build filters in the frequency domain to control the output of a system. The fact that this man said fft is useless because you don't see it in interviews makes me think this man has never truly written any useful programs.
I use FFT driven software for analysis of machine vibrations literally ALL the time. Any time you have a signal in the time doman but would like to jump to easier frequency domain, it's literally a must. His dismissal of it made me very disappointed. But I think these are general thoughts on "learn coding".
@@vladimirleon2487 yeah I think its dumb is that typical algorithms courses spend more time on typical solutions, or I guess you could say "algorithmic" solutions to programming problems, when most people know that a lot of solutions to problems aren't traditional solutions. Most of the time, the most optimal solution is something very niche and untraditional like the quake algorithm. This is why I study Electrical engineering and not computer science.
This tier list is about interviews dude. Who asks a fft problem in an interview?
Thanks man
Is this tier list for competitive programming as well? :)
Pretty sure this is specifically for competitive programming
Probability > C
Fast Fourier Transform > F
RAAAAAAAAAAAAAAAGEEEEEEEEEEE
Where would you rank "Treap" 's ?
For interviews, definitely an F. For competitive programming, they are very advanced, but also extremely powerful, so it depends. If you're anywhere below grandmaster, it's also an F, but if you're my level, it probably belongs in C-D (but it also depends on what you're training for; they'll be much more common for IOI-type stuff than CF).
Thanks man.
Have you ever covered Monotonic Stack. Don’t recall seeing it in any of your streams yet. Does that fit into stack or different dsa?
Yes, very much so. Look through his videos
Are you from Delaware?
Just Higher The Volume By A bit, im maxed out on volume and its sometimes difficult to understand
Please make a series on advanced dp
Please stat the topics instead of just saying "Advanced" dp.
kya bol raha h bandar ki jhat.
5:00
If you don't understand Fourier Transform you are completely crippled when processing any video or audio.
Nice explanation! But just wanna say pointers are just not hard tho
nice video
What a legend
I feel like it is just problematic to say bfs/dfs, but not stacl/linkedlist because you often use them to implementent those algorithms.
I though two pointer worth S?
what planet is this creature from
Nice title :)
POV an 1500 rated guys tierlist for algorithms
I'm here to see topics i don't learned yet 🌚.
you can roughly trust me
can you do a tier list of dsa for competetive coding?
Everything. CP is problem solving and to solve a problem u might need anything
where is recursion?
22:14
I thought u are a girl and when I watching it i was confused for a while that why I hear male voice instead female
If i do S and A only, is 2000 rating possible
yes
If you don't know segment tree, you don't know bitwise operators, you DON'T even know brute force or any bit of combinatorics.... In short, no (unless you pour your entire lifetime's luck into codeforces contests).
@@phamtuanthanh1654 haha true
except seg tree u can def get to 2000 without it
@@mackvanzanden4882 segment tree can be a huge rating boost factor sometime tho :)), it is versatile and quite easy to learn too
FFT is useless 😳
But it’s so coool.
Bro i didnt was expecting you with long hair
💯✨
Your list is meh (in my opinion) and may be very "competitive programming" oriented. I have never participated in any competitive programming tournament. I don't think prefix sum (which I have never heard of before this video) belongs to A. I also think "two-pointers" deserve much more love than you give it. Hash and linked list should be in "S", as I interpret "S" to be "if you don't know these things, don't even attempt technical interviews". Topological sort and Fenwick/Segment tree (never heard of that before) should be a rank lower (in my opinion).
Anything in A and B should be known before interviews (after applying my mods). A few topic in C are definitely "good to have". Everything else is for the birds (if one's goal is to pass technical interviews)
a tree is bunch of hashmaps
@@mihailmojsoski4202 Do you mean all trees or just fenwick/segment trees?
🧐🧐🧐
goat
fundamentally disagree. stack and recursion is tier S, and dfs is literally simplest apply of both recursion and stack, placing dfs in S and stack|recursion in B&C is soooo weird
also dfs is so much more useful than bfs, weird that they are combined. and also so many things not included like suffix array, comp. geometry (only convex hull), and many others (???) who did this tierlist lol
Why do you have long hair
Hi
Why did you make this tier list for interviews? You have alot more knowledge about CP, and this video ended up being heavily biased towards CP. I think a tier list about interviews would be better made by an actual interviewer at a big company or someone with more experience in the market than you. Excuse my broken english lol