Data Structures and Algorithms in 15 Minutes
Vložit
- čas přidán 28. 05. 2024
- Best resources to learn Data Structures and Algorithms:
Jomaclass: tren.jomaclass.com
MIT Lectures: • Lecture 1: Algorithmic...
► Patreon: / trenblack
► Instagram: / trenblack
► Twitter: / tren_black
► Merch: trenblack.com/merch
I wanted to try and give a general overview of Data structures and Algorithms. As someone who has a FAANG offer, I thought I'd jump start you guys into the coding interview scene with this video.
This video covers:
Arrays, linked lists, BFS (Breadth first search), DFS (depth first search), stack, queue, binary tree, bst, (binary search tree), binary search, graphs, topological sort, dijistkras, heaps, hash maps, collision, merge sort, divide and conquer, selection sort
#faang #coding #algorithms - Komedie
bruh I coulda just watched this instead of taking a whole ass class, this pretty much covered everything we learned..
Afroctopus okay but this is only the surface level. The class probably had you work through problems and gain a deeper understanding
@@xfire3778 true, but tbh you could watch this video, work through a couple easy leetcode problems and get a similar understanding. these concepts aren't super complicated and in my experience don't warrant an entire semester's worth of info. I could also be biased from my program, though
Facts just finished my data structures class am I’m like wtf
@@Afroctopus Assuming you had no prior knowledge, I highly doubt that watching a 16 minute CZcams video and doing a couple of programming problems would have given you anywhere near as good an understanding of DSA as a semester-long class.
@@danielwong4800 usaco
Your efficiency of communication is O(log(n))
O(1) ☺️
o(n)
F*cking linear
O(n!)
O(nlogn)
O(n)
I'm saving this for later when I can understand more than 10 words of what he says.
lol same
x2
i couldn't keep up
yeah its too fast that my brain processing can't keep up haha
maybe not, i finally understand what tren black was going for.
Waiting for - "Become software developer at Google in 14 minutes."
Lol
“Dropped the dead weight”...DAMN Tren savage AF
Nero left the chat
who's the "dead weight" tho?
@Voltan, here's a hint, "Why I'm a dead weight (as a Millionaire) "
@@ImranHossain-by6nk Was not a hint till "as a Millionaire"
Got my algorithms final tomorrow. This is all the studying I'm going to do
How'd it go?
@@MacAndSwiss Got a C lol should've studied... dynamic programming got me.
@@tear728 😂😂😂😂
@@tear728 damn lol
@@tear728 dp always gets everyone.
7 hours of algoexpert reduced to 15 minutes
pls merge sort promo code Clem
I'm 75% into a 60hrs Course of DSA......and its surprising how much of it you actually covered in this video.
Is it any good and if it is Mind sharing the course name?
@@rayjsuckdonkeydick4411 Mastering Data structures by Abdul Bari....on Udemy
It's kinda crazy how easy it is to teach DSA when the students actually underhand programming. I have taught this stuff to several students who are children, but I wait until they have been programming for a while and have a good grasp before introducing it.
It's not that DSA is super duper hard. It's that colleges teach it way too early. It'd be like jumping into calculus before learning algebra. (Or course colleges do that too with remedial math.)
@@Mathhead2000 Is it a must that I should know how to implement these data structures and algorithms from off the top of my head without looking anything up, or would just knowing about what they are and the use cases for each one (and the methods each collection support + their estimated time and space complexity) be good enough to get the job done?
@@thatoneuser8600 It depends. Generally speaking, you don't need to implement them in practice, because someone else has already done it. However, if you're trying to get a job, it's sometimes an interview question. I would say, it's good to know how to implement them, but you don't need to be a master at it.
You nailed it at the end with the whole “learning” thing. I can’t believe colleges teach in ways that are so in depth, but don’t explain the bigger picture first. I’ve always learned best by seeing what the purpose of something is first, and then learning in finer detail.
Agreed big time, thats why people have a hard time learning maths or maths based methods because of "It is how it is" instead of explaining why do we do it.''
exactly thats how my brain learns, start with a difficult topic at an elmentary level and go down layers of abstraction on the topic until you get to the nuts and bolts of it. at each level make notes and slap them on flashcards, have them on you during work or whatever and when you go through them and take 20 secs per card to explain the question. By the time your a few layers down you look back and smile at the card notes you had to write out in those top layers, each layer produces more understanding and the top layer card answers now seem so obvious to you with the layerd knowledge you gained, adding in videos on the topic layers and your mind just starts building lasting connections to the info, well for me anyway..layer by layer, day by day..
aqreeeeee
The fact that you understood most of the things explained in this video after you've done your college part of studying on these concepts shows you that there is a possibility that you wouldn't be able to understand what's going on in these video if they showed you as a first lecture in college. Am I wrong? You think that this video is useful and that type of teaching method should come first before going into details but even what makes you understand this video is these details you've learned before watching it. Do you understand what I'm saying? How could you precisely estimate what would be your real reaction to that video if you watched it with 0 previous knowledge as a lecture on your first day of college? You're connecting ideas and knowledge you have while you're watching the video right now and then you say "OH! That makes sense." OF COURSE THAT MAKES SENSE BOY BECAUSE YOU KNOW THEM AND NOW YOU ARE REVIEWING THEM. These videos are good for reviewing your broader and deeper initial study but not to take as initial by itself.
@@sogan754 supplements and necessities. You don't take supplements firstly; necessities define the need of supplements.
welp, there goes my career...
Drop haircare routine tho?
Not the first time White is defeated by Black
Career 🤣
@@satyakisarkar9123 😂😂😂
@@satyakisarkar9123 in a few more years all the Replies to this comment are going to be an _absolute hellhole_ .
So if anyone watching this is getting confused, try watching this after you have a basic understanding of programming (like the fundamentals of a programming language under your belt). This will make a ton of sense after that.
This is really well explained and packaged for you to UNDERSTAND what data structures and algorithms are. It's not for directly helping you solve problems.
More like come back once u know advanced maths concepts
Not gonna lie, but most people who came here already know DSA and just watched this for the vibe.
Omg, you explain data structures better than my CS professor. (I am not joking btw)
he really did
@@uruseibaka9456 nah!!
@@universal4334 DAMARE BAKA
That's because your CS professor wants you to be able to mathematically prove with these properties. It's a different level of understanding.
i agree my professor jumped to recursion on our first day, and i feel like i would have been so lost without this video
Wtf, I legit thought the Jomaclass link was some sort of joke hahahahahahahaha
its pretty good for beginners.
same
Like just say you’re sponsored bro lmao
it is
"Appending to a list is a constant time operation"
*Laughs in Computer Architecture*
lol
Now, I am curious.
Just a small word of encouragement from a software engineer without a degree: enough time and passion for programming will eventually turn you into a highly valuable specialist. Make it your hobby, and you'll enjoy most of the days of your professional career
or just attend college
@@mathbrah my personal experience with IT education system in my country was a mix of mostly bad stuff. I helped with programming implementation for a university graduate while still in middle school. And I dreamed to get into that university. Most of my former colleagues had a degree, yet a self-educated me was never lagging behind and even charged forward with important innovations. Also, many teachers force memorization instead of learning how things work, boxing one's creativity into a cage of poorly explained best practices. And let's not forget that higher education is often pretty damn expensive, especially in STEM.
Software development is creative work at its core. It evolves and moves forward so fast and university/college programme always plays catching up. I felt like I'm just wasting my time, and soon dropped out of my uni and scholarship. Pure passion got me to where I am in my life, and I have no regrets. College education is fine, but one can do great things without it too
@@Nekroido Ah I see. That is very sad.
@@mathbrah what exactly is sad?
@@Nekroido You loved programming, but in the place you lived, they all taught it wrong. Its sad seeing someone waste their potential like that. I'm still 15, and I'm learning from other people's successes and failures.
I applied to Amazon and they told me to do an online test. I'm going to email them this video instead and tell them I watched it so they should just hire me.
Very concise yet informative. Many others would spend 10 times as long to explain these concepts and not do as well at explaining. Fantastic!
I'm so glad I got to watch this before taking the class next semester, now I actually know what I'm about to get into and it'll be easier to understand the bigger picture. Thank you bro
“While a node with seven children is called a ***** my mother-in-law”
Thanks a lot man, I'm also a programmer and older than you, but I still learned/rememberd a ton from this video.
People like you inspire me to also bring more value to others, maybe I'll start a youtube channel myself one day, just teaching people the basics and who knows what else.
Have a great day everyone!
14:02 about 5 years ago, my Java class talked about data structures for months and I remembered absolutely nothing. The professors really need to talk about ALL of the data structures we are going to learn and then make a comparison every single day before class if they expect the students to retain any information.
I REALLY liked what you said about taking the big general idea of what you're learning first then diving deeper into it. I've had the same feeling towards that in teaching myself anything and the same frustration with the way my schools have taught. I've also described it as breadth-first learning
Hey, you kinda missed maximum subarray sum, sets, backtracking, meet in the middle, longest increasing subsequence, the knapsack problem, edit distance (or the Levenshtein distance), two pointers method, sliding window minimum, binary indexed tree (also known as BIT or the Fenwick tree), segment trees, greedy algorithms, dynamic programming, the bellman-ford algorithm, the floyd-warshall algorithm, a tree's diameter, kruskal's algorithm, union-find structure, prim's algorithm, cycle detection in graphs, connectivity check for graphs, kosaraju's algorithm, 2SAT, offline and online algorithms, eulerian paths, hamiltonian paths, the ford-fulkerson algorithm, the trie, the z-algorithm, mo's algorithm, lazy propagation, the convex hull problem, and sweep line algorithms.
I learned maybe two of those in my data structures course, and dynamic programming was touched on in Fundamentals II.
It's a 16 minute video bro
bro... if you watch a video on youtube which says "_____ in 15 minutes" you can rest assured that it's not going to cover 12 hours worth of content.
@@ooffoo5130 Guys I know we're cs majors but I think he may be making a joke!
I learned most of these in my discrete structures and Algorithms course
"...But I found situations where BSTs really shine are......when you are asked questions about BSTs!" Hilarious! :D
This is the best visually explained CS video I've seen yet🤧
You basically covered 75% to 80% of the content most 40-60 hours of DSA courses cover 😮!
I literally solved a few easy and medium problems based off your explanation and some research on wikipedia 🙌
Your videos are getting better. I prefer these types of videos over your previous content. Keep up the good work.
Imagine Techlead watching this lol
Damn you working with Joma now after you roasted him lol
Edit: Ahh I spoke too soon. That's good that he took the criticism and is improving himself.
hahahahahaha
The fact that he called him a sellout and is now taking money from him. The irony is too sweet 😂
@@TrenBlack I have a question that would likely not get a honest answer if I am wrong, did Joma pay you? And what do you really think about Joma class?
@@Red-yq6nc he probably did... But that doesn't mean his course isn't good... It's actually the best data structures course I've seen in my entire life and I would highly recommend it if u have the money
*Telling u as a fellow Itachi fan* XD
@@tusharsrivastava370 Shisui>Itachi
This was so well done man!! Those adjacency matrices are the same thing as transition matrices in markov chains, very interesting !
I'm glad I ran into this vid on the day before my job interview. A super helpful and well organized summary!
you have no idea how much knowledge this video contains untill you get a DSA course
…And there goes my semester in 16 minutes
Wow! How is it possible you squeeze all this in 15 mins and keep it engaging and relatable! Thumbs up from me!
this feels like such a nice refresher of everything I did in my algorithms class
Sir…you are amazing at summarizing. I’ve watched lots of videos of this subject and you actually give newbies a chance to understand what the heck is going on. Fantastic. Had to subscribe.
I always confuse Zyzz with Tren when using the mirin' hash function
Yeah i too confuse it.
You should make more of these. This is awesome, similar to what I want to do with content creation once I finish building my app. Except I want to teach these things by building little apps and explaining different options so that I have a real problem in the program I'm making to point to.
I just used this video to prep for my Google interview and made it to the next round with your help. Thank you!
Thanks for the refresher! Very easy to understand! Wish I had this video when I was taking the course.
As a math major who has to learn this on their own and also applies this method of “conceptual understanding first”, thank you. This is really awesome stuff.
This video was not only good for newcomers but its also good for people like me, with shit memory, to brush up on concepts.
Gotta give you some props on this. This is so visceral and to the point, exactly how I like it. I took this course in school and I struggled partly because it felt like the book was beating around the subject on a lot of the stuff. secondly, its not only to the point but there's just so much packed into a short amount of time. its one of the best videos on data structures I've seen, and I've been going through them a lot recently to refreshen up. So Thank you for making such a great video. I do wish you would upload more videos like these on other things regarding computer science.
i am learning this topic, actually started it weeks ago and i can tell i am really happy for understanding this video ! ♥
Pro tip: Big O notation isn’t all that matters. A program I was working on originally used a hash map and it ended up being slower because the overhead of hashing my keys (which where just numbers) was more than traversing a binary tree. Always test for performance critical applications
Are you sure you weren't using c++ stl unordered map? Its known for being very bad
hello garet, my name is garrett. i’d like to offer you an extra r or t since yours seem to have been stolen
@@primitivecereal nah mine's spelled the right way
@@garethalliday833 understandable have a nice day
Watched on 2x and learnt Data Structures in 7 mins 😎
I've been watching programming youtube videos for like 4 years now. A LOOT of them try to be funny. But man, you are the first one who is so good. I'm literally watching this just because its super funnny.
Watching this after finishing DSA college course and omfg... your visual interpretations of depth first search and breadth first search literally opened my third eye
This is the most knowledgeable advertisement ever existed.
First semester econ student with the most math I've done being calc 1 and intro level stats, so way over my head. Nodding along for the watch time.
There’s not a lot of math in this video, it’s really just understanding terminology
as a cs student myself when at 3:20 you said "... has to be sorted" i got shivers down my spine. I'm having a design and analysis of algorithms class where we tackle some of the most known sorting algorithms and its fun, but boy can the assignments be hard
These examples for each really really helped me visualize what each data structure and algorithm really did, so thank you ! :)
This is really one of the best summations of the work that I have ever seen and I have a Bsc computer and statistics degree. Good job man.
Thats a really good overview of data structures wasnt expecting lmao
elegantly conveyed and the animation makes it my favourite explanation video! thank you Tren!
I watched a 8 hour video on data structures and algorithms but I more understood by this video by you,salute to you.you helped a lot
Awesome vid! Just wanna add: In pathfinding Dijkstra's alg is inefficient cuz it traverses all nodes which is incredibly slow but it can find the shortest path to all nodes. Something like A* is more efficient since it goes through nodes that are closer to the end node and doesn't bother with the rest.
My month-long data structures class summed up in 16 minutes.
Dude this is so great. I learned more in this than I have watching hours of otherwise boring content. I learned, I laughed, and more importantly I *understood* . This is pure gold !!
so amazing! love the logical progression between ideas, makes learning it so much easier
Not only is this video extremely informative- it’s also funny as hell
I love this video! I understand it really easily. I just don’t like how fast it is, I think just a tad bit slower makes a lot of difference. Needed to pause and repeat because sometimes I did not understand the word he said. But overall, much better video compared from a ton of explanations in CZcams. Good job! Love it
You really explained everything so well, I have already watched it 3 times, whenever my mind wonder for even less than 1 second I miss the flow, then I watch it again. I'll be back to watch this video again and once I have complete understanding of this video I'll write it in the comment. Thank you.
Currently learnign ds&a and coming back to this video every while or so to see how much more I understand. Such a satisfying feeling
4:03 Interesting note: there actually are algorithms that can sort in O(n) time, although they're not often used. Radix Sort and Counting Sort are two examples. It's specifically comparison sorts (where you compare individual elements against each other, like Quicksort and Insertion Sort) that can never be faster than O(n logn).
Radix is often unused because of its overhead, making it inefficient for lists shorter than hundreds of thousands of elements.
@@Sam-vf5uc oh ok, because when you see radix sort on algorithm visualizations, it beats the sh*t out of the other algorithms 😄
He specified "an arbitrary collection" tho.
Actually, Count sort and Radix sort operate with a complexity of O(n) making them the most efficient sorting algorithms, it's just that special circumstances must be fulfilled to use them :D
Exactly, it's specifically comparison (sorts like Quicksort and Insertion Sort) that can never be faster than O(n logn)
@@benjaminphilippe2810 yes, but again quick sort has a wider spectre of usage than count sort, so it really depends of the situation
He specifically qualified the statement for "an arbitrary collection"
I think this is the best video I've ever seen. Went through two semesters not understanding why it was important or how I could actually use it. Professors should just show this on the first day of class
have an interview in two days and i havent done much data structures or algorithms since I graduated college. this was a very good overall review.
Everything went over my head. I need to slow down this video, then branch out and learn about each word.
Data structures is not a sprint but a marathon ... Go and study👍
I'm trying to get into programming and this video was really helpful. Thanks for making it 👍
Took both courses i love it when I can relate to everything you said
I watched your troll videos before, so I clicked this expecting more shenanigans, but not only did you surprise me, but you explained phenomenally well, like better some college professors I had.
See, this is the type of content I subbed for.
Dude I love you hahahaah I come here to study because I am super nervous for an interview and your video is so awesome, super fun and helpful, thank you
man comeback we need more such content from you such an underrated instructor
No way to grasp this in 15 minutes without pausing a single time, unless you're a genius :)
You can understand it normally without pausing.
@@rion7963 if you already know it then yes
This is intro programming stuff
@@leetcodespeedrun8431 bruh... No
@@Mathhead2000 Kinda, yes
I had a headache before watching this, now I can't find where'd I put my brain.
Hands down-the best DSA video I've ever watched. Thank you! :)
You're so talented at explaining this subject, excellent video
i still can't wrap my head around data structures and algorithms
same...
I remember saying that 5 years back because coding wasn’t my passion. But if you have that mindset “I really need to learn this shit”, it’ll come easy. Also, having prior project experience will help significantly
This would’ve saved me so much time in college lol
This is my first video of you that I watched and I must say I am very impressed. Great video!
This is the most exciting summary of DS and Algos I have ever seen. Well done! 😊
I feel that this actually is a good representation of the class I took last semester. Some of that might have been because it was crap because online, but I feel like its much more important to have intimate knowledge of a small amount of ideas and be able to combine them than to try to memorize a lot of stuff in CS.
Like a lot of people struggled in this class, but most of them didn't seem to understand anything. On one exam we were asked to implement an obvious brute force = O(n) algorithm (given an array with some special properties, determine if N is in the array) and after we got grades back one guy posted that 'he figured out how to do it in O(nlogn) and was confused why he got a 0 for that. A bunch of other people seemed to agree with him that was unfair.
If you were in data structures with me, sorry for throwing yall under the bus btw
TL;DR 10:54 another interesting question is the longest degrees of seperation between any users on facebook. And of course the answer is infinity because I have no friends
I have been trying to understand logarithmic complexities for a while, your explanation was so on point it only took a me a mere 30 seconds for me to understand it
HUGE THANKS, LIKE SERIOUSLY, THANK YOU
Great video! I particularly liked the breadth-first/depth-first learning analogy.
This is probably the best video about this content I've seen so far!
damn stack overflow is named after stack overflow, mind is blown 0.0
Frustrates me that I learned this all in my first year and I forgot it all within a year.
bro youre so good. this is so helpful man
Bruh this is one of the best videos I've watched this year, actually helpful and funny AF love it
Cool now you are getting audience those are not guru haters. Lol. Keep making these kind of video. I was also planning to make these kind of explaining complex but interesting concept in a way general people will like. Because it is something that everyone should experience. Like making people have some interest in the concept of famous algorithm by making them example out of real world scenarios. Btw one question are you Indian?
i think he is bengali lol
lmao he didnt even cover the surface of any of this funny when people try to watch these vids without knowing anything about computer science
@@zainsyed3928 There are already many people know how to use the Gun but don't know for why and what the meaning of Gun. So we don't want more idiots, we want more Humans who use their brains. Understand that friend!
@@OkarinHououinKyouma eh not really
@@OkarinHououinKyouma There's also a country's called Bangladesh, and he is from there.
stack overflow... I think I’ve heard that one before.....
Thanks, dude! Very brief, clear and informative, and fun! Thanks, fren!
by far the best video on DS and algo in youtube
0:05 my brain after watching this video
0:59 that's 100% source code from Yandere Simulator
I don’t get it
@@xfire3778 The Yandere dev is known for using spaghetti code.
Thank you!! I love the way you explained this.
THIS GUY TAUGHT US MORE THAN WHAT I LEARNT IN COLLEGE IN 16 minutes.....