Ranking Every Data Structure & Algorithm

preview_player
Показать описание
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.

Рекомендации по теме
Комментарии
Автор


Note that it's a work in progress.

ColinGalen
Автор

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.

davidde
Автор

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

junhuang
Автор

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?

nikhil_a
Автор

as an amateur CP i love your content, always so insightful and interesting

casualBob
Автор

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?

Blackfir
Автор

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.

stephanbranczyk
Автор

A perf video summerizing almost all useful DS, Algos

fakedevdutt
Автор

Really cool to see new perspectives on things. Thanks for such a unique and interesting video!

wesleyso
Автор

The things you said about recursion were so ON POINT!!!

"I know it, but i don't". Mahnn it sucks!

ztrixx
Автор

When you said about subarrays at 19:50, my first thought is usally sliding window not prefix sum :/

gokusaiyan
Автор

I really hoped you would have put on screen the definition of the topics once introduced

darioabbece
Автор

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?

SakshamSharma-trfk
Автор

does this tier list also work for competitive programming ? thanks

The.Anime.Library
Автор

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 .

ngoquangtrung
Автор

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.

GeminiZeroX
Автор

I think I would prefer if you ranked just purely off of usefulness for coding interviews rather than factoring in being easy to learn

EZboyrocks
Автор

why are you ranking on how hard it is? you should be ranking on usefulness

juanmoscoso
Автор

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?

johntaylor
Автор

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)

karolinaa