Stack - Setup
6:50
9 жыл бұрын
Google Test
5:01
9 жыл бұрын
CMake
3:02
9 жыл бұрын
Data Structures in C++ - Setup
1:41
9 жыл бұрын
Data Structures in C++ - Intro
0:36
9 жыл бұрын
Red Black Tree - Part 0
9:13
10 жыл бұрын
Big Omega Notation - Part 2
10:47
10 жыл бұрын
Big Oh Notation - Part 2
10:25
10 жыл бұрын
Dijkstra's Shortest Path
8:23
10 жыл бұрын
Disjoint Sets - Union Operation
13:18
10 жыл бұрын
Graphs Adjacency Lists and Matrices
12:16
Graphs - Breadth First Search
8:29
10 жыл бұрын
Graphs - Depth First Search
6:25
10 жыл бұрын
Red Black Tree - Part 1
13:59
10 жыл бұрын
Decision Tree
9:36
10 жыл бұрын
Master Method
10:00
10 жыл бұрын
Mathematical Induction - Part 2
11:40
10 жыл бұрын
Recursion Tree - Uneven
16:45
10 жыл бұрын
Mathematical Induction - Part 1
4:04
10 жыл бұрын
Heap - Build Max Heap
6:10
10 жыл бұрын
Heap - Max Heapify
6:24
10 жыл бұрын
Recursion Tree - Even
11:51
10 жыл бұрын
Time Complexity - Part 2
18:55
10 жыл бұрын
Time Complexity - Part 1
13:32
10 жыл бұрын
Пікірлер
@FREEDOMSPARTAN
@FREEDOMSPARTAN 12 күн бұрын
Awesome!
@EC23331
@EC23331 22 күн бұрын
So add the numbers and then swap them until highest number at top?
@elyartaker1139
@elyartaker1139 22 күн бұрын
wow thank you for this
@jortor2932
@jortor2932 Ай бұрын
Come back zooce dude btw how are you
@Z00CE
@Z00CE Ай бұрын
@@jortor2932 Thank you for asking! I’ve never been better. No new videos coming anytime soon (you never know I guess), but I’m very glad that people continue to get value from them.
@jortor2932
@jortor2932 Ай бұрын
@Z00CE ohh ok fine btw is everything alright in life
@TrilochanVYannawar
@TrilochanVYannawar 2 ай бұрын
Very helpful man. Thanks a lot.
@surbhikharche2317
@surbhikharche2317 4 ай бұрын
I am looking for decision tree using quick sort algorithm, any clue?
@UrkoCornejo
@UrkoCornejo 6 ай бұрын
Thank you best heapify explanation i saw !!🦾
@wangbiqing2888
@wangbiqing2888 6 ай бұрын
Visually I see the last swap between 5 and 37. but programmatically how to detect the disorder after looping all node index?
@mashrifrishal8545
@mashrifrishal8545 8 ай бұрын
I can't imagine this is a video from 10 years ago and I am surprised that it didn’t get the rich.Wow!!Very rare video of dfs in directed graph
@teeheeee7807
@teeheeee7807 8 ай бұрын
Thank u so much it helps a lot 💗
@Денис-ж3ф5р
@Денис-ж3ф5р 8 ай бұрын
You’re out of this world
@Vlad-rk5go
@Vlad-rk5go 8 ай бұрын
3:45 why do we swap 97 and 1 instead of 97 and 12? Even overall I can't see any benefits over using a binary tree.
@tomwerges8433
@tomwerges8433 3 ай бұрын
The swap 97 and 1 actually occurred at 3:05. He just didn't bother update thr array representation up top until later. The algorithm for create-max-heap always starts with half the total nodes, or node 4, then the max-heapify routine considers the children of that node. This is superior to a binary tree in some cases because a binary tree would need to be re-sorted completely with each insertion which would be slower. Even though this tree is not completely sorted, it still has the property that removing the top node and heapifying will always result in the nodes coming off in reverse order of size. Also, the nodes are actually stored in an array, and not connected by pointers as in a binary tree, so there would be much less pointer dereferencing which would be faster.
@photocide17
@photocide17 9 ай бұрын
Thank you, finally a good video on dfs timestamps.
@MrShinCup
@MrShinCup 9 ай бұрын
-25n <= -25n^2 cannot be true for natural numbers n btw
@nurulfadillah1248
@nurulfadillah1248 10 ай бұрын
this is really helpful, thank you!
@logan2116
@logan2116 10 ай бұрын
great explanation
@nowherelefttojump
@nowherelefttojump 10 ай бұрын
i owe you my entire life
@garic8423
@garic8423 11 ай бұрын
10 years later this is still really helpful!
@shashankjoshi8250
@shashankjoshi8250 11 ай бұрын
At the end you are not adding the cost of leaves
@aimannasir5833
@aimannasir5833 11 ай бұрын
Why you have stopped making such a quality videos??
@anhkhoi2926
@anhkhoi2926 Жыл бұрын
thanks bro
@juanivillanueva7873
@juanivillanueva7873 Жыл бұрын
saved my day bro
@maxkellerer1923
@maxkellerer1923 Жыл бұрын
wish that someone explained like this in the lecture
@antoinekammouni
@antoinekammouni Жыл бұрын
kteer btna3es kes emak
@Lukas-bb4sg
@Lukas-bb4sg Жыл бұрын
Thanks
@batuhanbayr7613
@batuhanbayr7613 Жыл бұрын
KZbin AWARDS GOES TO..
@approachableGoals
@approachableGoals Жыл бұрын
Thank you so much! I finally understand how we get that table(or two matrix) step by step! This is the best explanation I found!
@tourdesource
@tourdesource Жыл бұрын
That's a pretty stupid algorithm, unless you have very unusual memory constraints.
@itsvignan
@itsvignan Жыл бұрын
does insertion of nodes always be in red initially?
@andrewwatts1997
@andrewwatts1997 Жыл бұрын
Can someone explain to me why after each instruction you add 4 to the program counter. Asuming you have an 8 bit rom, getting a 32 bit instruction field would require you to cycle through 4 adresses to begin with. What's the point to adding 4 after that ? Is there a secret two bit counter somewhere that's not displayed and this is just an over simplification ?
@ozzyfromspace
@ozzyfromspace Жыл бұрын
Watched at x2 and it immediately brought the algorithm back. Clearly you're amazing at presenting information. Thanks, mate!
@muratpinkman9679
@muratpinkman9679 Жыл бұрын
Finally i found someone who is not from india
@chaitanyabalanagu626
@chaitanyabalanagu626 Жыл бұрын
For those wondering how this algorithm works as it stops in the middle, you need to write a condition to check if maxHeap property is applied for the whole list everytime and repeat the process of heapify if it fails, here is an example import java.util.Arrays; public class MyClass { static boolean maxHeapFormed = false; public static void main(String args[]) { int[] nums = {5,12,64,1,37,90,91,97}; while(maxHeapFormed == false){ maxHeapify(nums); checkMaxHeap(nums); } System.out.println(Arrays.toString(nums)); } public static void checkMaxHeap(int[] nums){ int leftChild; int rightChild; for(int i = nums.length/2;i>=0;i--){ leftChild = 2*i+1; rightChild = 2*i+2; if(leftChild < nums.length && nums[leftChild] > nums[i]) return; else if(rightChild < nums.length && nums[rightChild] > nums[i]) return; } maxHeapFormed = true; } public static void maxHeapify(int[] nums){ int length = nums.length; for(int i = nums.length/2;i>=0;i--){ heapify(nums,i); } } public static void heapify(int[] nums, int i){ int maxValue = i; int leftChild = 2*i+1; int rightChild = 2*i+2; if(leftChild < nums.length && nums[leftChild] > nums[maxValue]) maxValue = leftChild; if(rightChild < nums.length && nums[rightChild] > nums[maxValue]) maxValue = rightChild; if(maxValue != i) swap(nums,maxValue,i); } public static void swap(int[] nums,int highest, int i){ int temp = nums[highest]; nums[highest] = nums[i]; nums[i] = temp; } }
@fog1257
@fog1257 Жыл бұрын
Thanks!
@theone6853
@theone6853 Жыл бұрын
Your explanation is very easy to understand
@devinj374
@devinj374 Жыл бұрын
fantastic video!
@coyotulnegru
@coyotulnegru Жыл бұрын
thank you mister
@Lordycal
@Lordycal Жыл бұрын
ngl this made no sense. How did you have that graph already made? shouldnt you be making it as you go?
@masterjif9506
@masterjif9506 8 ай бұрын
Well it doesn’t matter now cause you passed your exam anyway
@tomwerges8433
@tomwerges8433 3 ай бұрын
The graph doesn't actually exist. It's just a visual representation of what's in the array. He draws the whole thing for demonstration purposes.
@qwertek8413
@qwertek8413 Жыл бұрын
thanks ;)
@43_ayonroy4
@43_ayonroy4 2 жыл бұрын
I have to submit an assignment tomorrow but I also have an exam on the same day. I need help
@noodleboi5053
@noodleboi5053 2 жыл бұрын
8 years ago and his mic sound better than mine
@B0BHD
@B0BHD Жыл бұрын
its quiet af
@noodleboi5053
@noodleboi5053 Жыл бұрын
im done with math dont remind me of this era@@B0BHD
@B0BHD
@B0BHD Жыл бұрын
@@noodleboi5053 LOL im not sadly have an exam on Tuesday. Just added that this video is veeery quiet haha
@kendellferguson5021
@kendellferguson5021 2 жыл бұрын
Who knew Ben Shapiro would be teaching me Data Structures lol Great Video btw
@ti6252
@ti6252 2 жыл бұрын
thank you my savior
@wristocrat
@wristocrat 2 жыл бұрын
I enjoyed the part where you sniffed and smacked your lips. Oh wait, that was the entire video
@natsuvatsan6108
@natsuvatsan6108 2 жыл бұрын
What about min heap?
@RelaxationVideos99
@RelaxationVideos99 2 жыл бұрын
Where are you now zooce
@dauferm
@dauferm 2 жыл бұрын
right? right? right? right? so insufferable.
@Ayanshandseals
@Ayanshandseals 2 жыл бұрын
This is absolutely amazing video with very much on-point run of DFS with pre and post numbers for the algorithm. Thank You!
@chrise202
@chrise202 2 жыл бұрын
at 5:10, after i=1, your algorithm stops according to the code (for i=1 to 1). You have not explained how did you found out that the LEFT child of index i=1 does not align with the max_heap rules. You did it via visual inspection instead :(
@williamshaoul8088
@williamshaoul8088 11 ай бұрын
The way we'd know if a node did not follow max_heap rules is by having the maxHeapify function being recursive. There is a conditional at the top of the algorithm that checks if A) the node we are at is a leaf or B) either child of the node has a value that is greater than the current node's value that is being passed through. If the current node is a leaf we can't heapifyDown anymore, but if either child is greater we check which one has a greater value and do a regular swap. Then we recursively call the function again. This process allows for a natural "trickle" down the heap, and for the recursion to be killed if the base case conditional is true (the current node is a leaf OR both children are less than the current value)..
@colecook834
@colecook834 10 ай бұрын
Thank you
@Fanaz10
@Fanaz10 8 ай бұрын
yea that was wack
@aaryan__bondekar9778
@aaryan__bondekar9778 4 ай бұрын
ig its included in max heapify for recursive check
@BlokeBritish
@BlokeBritish 2 жыл бұрын
isn't there a way to gather the indexes of the subsequence while iterating through the array ?