Ranking Every Data Structure & Algorithm

  Рет қаралды 63,359

Colin Galen

Colin Galen

Жыл бұрын

An all-inclusive DSA (and other topics) tier list. Roughly based on determining how much time it's worth putting into each topic. Expect some valuable insights about each one.
The tier list template: tiermaker.com/create/dsa-tier...

Пікірлер: 127
@ColinGalen
@ColinGalen Жыл бұрын
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.
@adameve8880
@adameve8880 Жыл бұрын
From the perspective of competitive programming/interviews, I seem to mostly agree with your ranking. But from the real world perspective I want to point out just how important something like FFT, MST, Sqrt Decomposition are. Especially FFT, it is virtually, no *actually* used in every single machine that is connected to some sort of network (and even in many that are not!). The amount of cleverness and genius tricks it took to go from O(n^2) (which already took a lot of clever tricks) to O(n log n) that FFT/DFT gives us is monumental. I would highly recommend every person interested in algorithms to study it. If anything, it will show you how colourful and creative the world of problem solving in CS is and how much ingenuity it often requires.
@mygosity
@mygosity Жыл бұрын
Thanks for that insight. Your comment made me want to study FFT.
@joakimolovsson7310
@joakimolovsson7310 Жыл бұрын
It's funny, being from a physics background, I've done signal analysis with FFT, but never thought it would apply for polynomials when I studied it.
@YeetYeetYe
@YeetYeetYe Жыл бұрын
How real world are we talking? Pretty much none of these are needed for an actual developer job.
@onikjahansagor2226
@onikjahansagor2226 Жыл бұрын
@@YeetYeetYe dude development is just a liiiiiittttleeee part of Computer Science. People don't need to learn most of the things in this video to be a developer.
@YeetYeetYe
@YeetYeetYe Жыл бұрын
@@onikjahansagor2226 agreed
@davidde7620
@davidde7620 Жыл бұрын
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.
@Blackfir333
@Blackfir333 Жыл бұрын
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?
@wesleyso0
@wesleyso0 Жыл бұрын
Really cool to see new perspectives on things. Thanks for such a unique and interesting video!
@nikhil_a01
@nikhil_a01 Жыл бұрын
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
@fakedevdutt 24 күн бұрын
phrased it perf! Im really worried cause I find two pointer hard I cant seem to identify the two pointer solution to problems!
@stephanbranczyk8306
@stephanbranczyk8306 Жыл бұрын
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.
@casualBob7
@casualBob7 Жыл бұрын
as an amateur CP i love your content, always so insightful and interesting
@fakedevdutt
@fakedevdutt 24 күн бұрын
A perf video summerizing almost all useful DS, Algos
@junhuang9047
@junhuang9047 Жыл бұрын
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
@janmichaelaustria620
@janmichaelaustria620 Жыл бұрын
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
@nikhilnagrale
@nikhilnagrale Жыл бұрын
Amazing content idea
@SakshamSharma-tr9fk
@SakshamSharma-tr9fk Жыл бұрын
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?
@ngoquangtrung234
@ngoquangtrung234 Жыл бұрын
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 .
@tranminhhieu9492
@tranminhhieu9492 Жыл бұрын
Great video. Subscribed
@karolinaa9478
@karolinaa9478 Жыл бұрын
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)
@ztrixx3280
@ztrixx3280 Жыл бұрын
The things you said about recursion were so ON POINT!!! "I know it, but i don't". Mahnn it sucks!
@anatolyklimenko
@anatolyklimenko Жыл бұрын
In order to understand recursion you need to understand recursion
@The.Anime.Library
@The.Anime.Library Жыл бұрын
does this tier list also work for competitive programming ? thanks
@illymns3339
@illymns3339 Жыл бұрын
Really nice video! Going to come back to this one day xd
@GeminiZeroX
@GeminiZeroX Жыл бұрын
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.
@gregorymorse8423
@gregorymorse8423 Жыл бұрын
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
@user-dh8oi2mk4f
@user-dh8oi2mk4f Жыл бұрын
@@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.
@gregorymorse8423
@gregorymorse8423 Жыл бұрын
@@user-dh8oi2mk4f if the company does signal processing, then it might be the most important question. Just depends on the specific sector
@hil449
@hil449 5 ай бұрын
Too niche
@gokusaiyan1128
@gokusaiyan1128 Жыл бұрын
When you said about subarrays at 19:50 , my first thought is usally sliding window not prefix sum :/
@johntaylor374
@johntaylor374 Жыл бұрын
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?
@ChrisCox-wv7oo
@ChrisCox-wv7oo Жыл бұрын
Yes, very much so. Look through his videos
@loveforallbxlmannif
@loveforallbxlmannif 3 ай бұрын
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..
@improvidancer
@improvidancer Жыл бұрын
hands movements are great!!!
@juanmoscoso9573
@juanmoscoso9573 Жыл бұрын
why are you ranking on how hard it is? you should be ranking on usefulness
@EZboyrocks
@EZboyrocks Жыл бұрын
I think I would prefer if you ranked just purely off of usefulness for coding interviews rather than factoring in being easy to learn
@obeytweety
@obeytweety Жыл бұрын
Colin i love your videos!!
@darioabbece3948
@darioabbece3948 Жыл бұрын
I really hoped you would have put on screen the definition of the topics once introduced
@ColinGalen
@ColinGalen Жыл бұрын
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.
@marcotroster8247
@marcotroster8247 Жыл бұрын
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 😄
@novelspace
@novelspace Жыл бұрын
Did you just call fft an f? Imo the rest of this list is null bc of that.
@joakimolovsson7310
@joakimolovsson7310 Жыл бұрын
Is this tier list for competitive programming as well? :)
@EragonShadeslayer
@EragonShadeslayer Жыл бұрын
Pretty sure this is specifically for competitive programming
@maxhaibara8828
@maxhaibara8828 Жыл бұрын
you can't just put both of my most favorite algorithm in the F tier list
@philstanton8912
@philstanton8912 Жыл бұрын
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
@sean7185
@sean7185 Жыл бұрын
What is FFT used for? I've only ever heard of it used for digital signal processing for audio
@brownketch
@brownketch Жыл бұрын
rf applications (radar, cell, radio), image processing
@sunahgamer321l4
@sunahgamer321l4 Жыл бұрын
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.
@vladimirleon2487
@vladimirleon2487 Жыл бұрын
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".
@sunahgamer321l4
@sunahgamer321l4 Жыл бұрын
@@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.
@hil449
@hil449 5 ай бұрын
This tier list is about interviews dude. Who asks a fft problem in an interview?
@susrandomguy
@susrandomguy Жыл бұрын
Thanks man.
@lucabrasi49
@lucabrasi49 Жыл бұрын
Is there a video on how he went from knowing none of these topics to being an international grandmaster ?
@jyothishkumar3098
@jyothishkumar3098 Жыл бұрын
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.
@caiodavi9829
@caiodavi9829 5 ай бұрын
what the fuck is DSP
@joshgundy9885
@joshgundy9885 4 ай бұрын
​@@caiodavi9829 Digital Signal Processing. It's an Electrical Engineering thing mostly, I think.
@VITS-tu6qy
@VITS-tu6qy Жыл бұрын
Thanks man
@tranminhhieu9492
@tranminhhieu9492 Жыл бұрын
Where would you put Backtracking?
@TrenBlack
@TrenBlack 3 ай бұрын
brute force and recursion are both in B
@amiisomer9758
@amiisomer9758 Жыл бұрын
Are you from Delaware?
@proofhundred986
@proofhundred986 Жыл бұрын
Just Higher The Volume By A bit, im maxed out on volume and its sometimes difficult to understand
@abhiupadhyay3615
@abhiupadhyay3615 Жыл бұрын
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
@noobnessmee
@noobnessmee Жыл бұрын
Petition to put DP at S tier. Come on man, it deserves it
@alexgabriel5877
@alexgabriel5877 Жыл бұрын
nice vid! would've been cool if you gave a TLDR about the topics :)
@ColinGalen
@ColinGalen Жыл бұрын
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.
@mdyousufgazi4030
@mdyousufgazi4030 Жыл бұрын
nice video
@prabhpreetsingh5341
@prabhpreetsingh5341 Жыл бұрын
Binary Search not in S Tier. Um Nik is not happy
@johannes8144
@johannes8144 Жыл бұрын
Where would you rank "Treap" 's ?
@ColinGalen
@ColinGalen Жыл бұрын
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).
@FelixNielsen
@FelixNielsen 6 ай бұрын
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.
@coced
@coced Жыл бұрын
-You may be confused about [...] -Yes
@uraqt103
@uraqt103 Жыл бұрын
I though two pointer worth S?
@williamchamberlain2263
@williamchamberlain2263 Жыл бұрын
Nice title :)
@koffiegast
@koffiegast Жыл бұрын
Probability > C Fast Fourier Transform > F RAAAAAAAAAAAAAAAGEEEEEEEEEEE
@vaalarivan_p
@vaalarivan_p Жыл бұрын
5:00
@rupanugapmishra7128
@rupanugapmishra7128 Жыл бұрын
can you do a tier list of dsa for competetive coding?
@ganeshchowdhary3024
@ganeshchowdhary3024 Жыл бұрын
Everything. CP is problem solving and to solve a problem u might need anything
@leosin5767
@leosin5767 Жыл бұрын
Nice explanation! But just wanna say pointers are just not hard tho
@alexanderoneill6160
@alexanderoneill6160 Жыл бұрын
FFT is the most useful algorithm ever anything involving periodic signals will use FFT it should easily have its own S+ tier.
@dillon1012
@dillon1012 Жыл бұрын
Yep :]
@wlanwlan4627
@wlanwlan4627 Жыл бұрын
I feel like it is just problematic to say bfs/dfs, but not stacl/linkedlist because you often use them to implementent those algorithms.
@akashbhoi1951
@akashbhoi1951 Жыл бұрын
Please make a series on advanced dp
@kumarsamaksha7207
@kumarsamaksha7207 Жыл бұрын
Please stat the topics instead of just saying "Advanced" dp.
@kumarsamaksha7207
@kumarsamaksha7207 Жыл бұрын
kya bol raha h bandar ki jhat.
@abdulmuqtadir8898
@abdulmuqtadir8898 Жыл бұрын
What a legend
@chuckynorris616
@chuckynorris616 6 ай бұрын
what planet is this creature from
@xorcerer
@xorcerer 8 ай бұрын
POV an 1500 rated guys tierlist for algorithms
@aligohar1708
@aligohar1708 Жыл бұрын
If i do S and A only, is 2000 rating possible
@mackvanzanden4882
@mackvanzanden4882 Жыл бұрын
yes
@phamtuanthanh1654
@phamtuanthanh1654 Жыл бұрын
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).
@mackvanzanden4882
@mackvanzanden4882 Жыл бұрын
@@phamtuanthanh1654 haha true
@mackvanzanden4882
@mackvanzanden4882 Жыл бұрын
except seg tree u can def get to 2000 without it
@phamtuanthanh1654
@phamtuanthanh1654 Жыл бұрын
@@mackvanzanden4882 segment tree can be a huge rating boost factor sometime tho :)), it is versatile and quite easy to learn too
@4mb127
@4mb127 Жыл бұрын
If you don't understand Fourier Transform you are completely crippled when processing any video or audio.
@connorhughes4582
@connorhughes4582 Жыл бұрын
you can roughly trust me
@cmdv42
@cmdv42 Жыл бұрын
💯✨
@sunnyrawat931
@sunnyrawat931 Жыл бұрын
I'm here to see topics i don't learned yet 🌚.
@rafaelelmachs
@rafaelelmachs 3 ай бұрын
Bro i didnt was expecting you with long hair
@raphaelnej8387
@raphaelnej8387 Жыл бұрын
FFT is useless 😳 But it’s so coool.
@jinmori7561
@jinmori7561 Жыл бұрын
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
@jelez0bet0n90
@jelez0bet0n90 6 ай бұрын
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
@jelez0bet0n90
@jelez0bet0n90 6 ай бұрын
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
@ItzItzJARED
@ItzItzJARED Жыл бұрын
goat
@user-cv4jm2sz5k
@user-cv4jm2sz5k Жыл бұрын
🧐🧐🧐
@nithinkumar6105
@nithinkumar6105 Жыл бұрын
Hi
@skyhappy
@skyhappy Жыл бұрын
Why do you have long hair
@hil449
@hil449 5 ай бұрын
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
@mrseanpaul81
@mrseanpaul81 Жыл бұрын
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)
@mihailmojsoski4202
@mihailmojsoski4202 Жыл бұрын
a tree is bunch of hashmaps
@user-dh8oi2mk4f
@user-dh8oi2mk4f Жыл бұрын
@@mihailmojsoski4202 Do you mean all trees or just fenwick/segment trees?
@Ihavetoreturnsomevideotapes
@Ihavetoreturnsomevideotapes Жыл бұрын
My favourite femboy
@emerald39
@emerald39 Жыл бұрын
No need for this nonsense
@tearnfourstar
@tearnfourstar Жыл бұрын
Beyond cringe
@recursion.
@recursion. Жыл бұрын
the one who makes fun of other appearance will usually end up getting frowned upon their life condition
@ColinGalen
@ColinGalen Жыл бұрын
I don't particularly mind the comment itself, but I'm a little disappointed that it's by far the most liked
@Ent-wicklung
@Ent-wicklung 3 ай бұрын
Haters gonna hate
10 weird algorithms
9:06
Fireship
Рет қаралды 1,1 МЛН
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 8 МЛН
ELE QUEBROU A TAÇA DE FUTEBOL
00:45
Matheus Kriwat
Рет қаралды 22 МЛН
Intro to Competitive Programming
11:41
Junferno
Рет қаралды 758 М.
The Player Who Broke Competitive Yo-Yo
20:11
RESPRiT
Рет қаралды 923 М.
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,3 МЛН
3-Minute Mental Hack to Take Control of Your Subconscious
11:25
Colin Galen
Рет қаралды 1,2 МЛН
DATA STRUCTURES you MUST know (as a Software Developer)
7:23
Aaron Jack
Рет қаралды 920 М.
The Feasibility Bias: Why You're Not Happy With Where You Are
14:45
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 589 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 1,5 МЛН
Обзор игрового компьютера Макса 2в1
23:34
Куда пропал 3D Touch? #apple #iphone
0:51
Не шарю!
Рет қаралды 726 М.
AMD больше не конкурент для Intel
0:57
ITMania - Сборка ПК
Рет қаралды 507 М.
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,6 МЛН
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 23 МЛН