Jump Game VI | Live Coding with Explanation | Leetcode - 1696

  Рет қаралды 4,926

Algorithms Made Easy

Algorithms Made Easy

Күн бұрын

Пікірлер: 9
@prakhyat2001
@prakhyat2001 Жыл бұрын
thanks a lot
@iamnoob7593
@iamnoob7593 3 ай бұрын
Thank u
@Gamerboy18821
@Gamerboy18821 2 жыл бұрын
Great Explanation . Thankyou❤
@ujjalsaha428
@ujjalsaha428 2 жыл бұрын
In the Priority Queue solution the space complexity can go up to O(N) and the Time Complexity is also effected by that. If you try this test case [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] 3 and print the size of the Priority Queue at each iteration, then you will find that the size is constantly increasing. It is because the out of bound elements will not always be at the top of the pq. So while ( i - pq.peek()[0] > k) { pq.remove(); } will not be able to remove elements that are not useful. I love your explanations. Your channel is really helpful for learners like me and many others. Waiting for you to cross 100K.
@harigovind11
@harigovind11 2 жыл бұрын
That's right. I also don't think the pruning approach bounds the pq size but only keeps the desired element at the top of the heap.
@koushikkgs7495
@koushikkgs7495 2 жыл бұрын
bro nice work.
@smartswaggy6114
@smartswaggy6114 2 жыл бұрын
Cant you use simple methods like pop() and push()? Worst coding explanation ever
@prajwalurkude007
@prajwalurkude007 2 жыл бұрын
Moron, he is coding in Java not C++.
@pironobcoding
@pironobcoding 2 жыл бұрын
use your own brain, are you kid who need spoonfeeding of all the explanation, can't you see the efforts provided by the creators
Jump Game VII | Live Coding with Explanation | Leetcode - 1871
15:27
Algorithms Made Easy
Рет қаралды 3,2 М.
Leetcode 1696. Jump Game VI [Monotone Queue]
17:51
Fraz
Рет қаралды 11 М.
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 13 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 37 МЛН
Jump Game VII - Leetcode 1871 - Python
12:28
NeetCode
Рет қаралды 14 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 854 М.
Minimum Absolute Difference in BST | Leetcode - 530
14:07
Algorithms Made Easy
Рет қаралды 4,3 М.
Jump Game - Greedy - Leetcode 55
16:28
NeetCode
Рет қаралды 258 М.
Maximum Number of Events That Can Be Attended | Leetcode - 1353
15:10
Algorithms Made Easy
Рет қаралды 7 М.
How I Failed the Google Coding Interview (and lessons I learned)
14:24
L4. Jump Game - I | Greedy Algorithm Playlist
10:53
take U forward
Рет қаралды 62 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 162 М.
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 13 МЛН