Furthest Building You Can Reach | Live Coding with Explanation | Leetcode - 1642

  Рет қаралды 8,964

Algorithms Made Easy

Algorithms Made Easy

3 жыл бұрын

Get Discount on GeeksforGeeks courses (practice.geeksforgeeks.org/co...) by using coupon code: ALGOMADEASY
To support us you can donate
Patreon: / algorithmsmadeeasy
UPI: algorithmsmadeeasy@icici
Paypal: paypal.me/algorithmsmadeeasy
Check out our other popular playlists:
Questions you might like:
✅✅✅[ Tree Data Structure] : • Tree Data Structure
✅✅✅[ Graphs Data Structure] : • Graph Data Structure
✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
✅✅✅[ January Leetcoding Challenge] : • January Leetcoding Cha...
✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
✅✅✅[ March Leetcoding Challenge] : • March Leetcoding Chall...
✅✅✅[ December Leetcoding Challenge] : • December Leetcoding Ch...
✅✅✅[ November Leetcoding Challenge] : • November Leetcoding Ch...
✅✅✅[ August Leetcoding Challenge] : • August LeetCoding Chal...
✅✅✅[ July Leetcoding challenges] : • July LeetCoding Challe...
✅✅✅[ June Leetcoding challenges] : kzbin.info?list...
✅✅✅[ May Leetcoding challenges] : • May LeetCoding Challen...
✅✅✅ Cracking the Coding Interview - Unique String: • Cracking the Coding In...
Problem Link: leetcode.com/problems/furthes...
Code: github.com/Algorithms-Made-Ea...
If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.
#coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode

Пікірлер: 34
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!! Questions you might like: ✅✅✅[ Tree Data Structure] : kzbin.info/aero/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls ✅✅✅[ Graphs Data Structure] : kzbin.info/aero/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C ✅✅✅[ February Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm ✅✅✅[ January Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn ✅✅✅[ February Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm ✅✅✅[ March Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2zH-YC5ZiptbAvw2QZkmyk9 ✅✅✅[ December Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA ✅✅✅[ November Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e ✅✅✅[ August Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe ✅✅✅[ July Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC- ✅✅✅[ June Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2xIPptnCvUtKrUcod2zAKG ✅✅✅[ May Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e ✅✅✅Cracking the Coding Interview - Unique String: kzbin.info/aero/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE Struggling in a question?? Leave in a comment and we will make a video!!!🙂🙂🙂
@xueli5641
@xueli5641 2 жыл бұрын
I love this video. So glad to see your video in the search results. Thank you.
@sproutboot
@sproutboot 5 ай бұрын
known your dsa solution video from 2022, love your explanation
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 ай бұрын
Thank you!!
@rhythmbhatia8906
@rhythmbhatia8906 2 жыл бұрын
Thanks for the awesome explanation!
@sainikhil956
@sainikhil956 2 жыл бұрын
Ma'am i dont have the habit of writing in comments but the way u solved it i really enjoyed it ,code is very beautiful just like you thank you! keep doing good work
@philbowden
@philbowden 2 ай бұрын
that was excellent. Thank you.
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy Ай бұрын
Thank you!!
@amrholo4445
@amrholo4445 5 ай бұрын
Thank you so much, helped me a lot
@karthikmr1855
@karthikmr1855 3 жыл бұрын
wonderful explanation mam.thankyou so much
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Glad you liked it !!
@SenthilKumar-ep4mq
@SenthilKumar-ep4mq 3 жыл бұрын
Best explanation❤️, keep posting🙏
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Thanks 😀
@shivshaktipandey7148
@shivshaktipandey7148 2 жыл бұрын
best explanation , too smooth
@sonukumarram1880
@sonukumarram1880 5 ай бұрын
great explanation through animation made me clear my doubts thnx a lot
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 ай бұрын
Thank you!!
@SurajYadav-ve1tr
@SurajYadav-ve1tr 3 жыл бұрын
hey, in your second code how it will check whether to use ladder or brick depending upon the priority queue?
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
The condition if(q.size()>ladders) will remove the smallest number from the priority queue. So, that will optimize the use of ladder and bricks
@muthuvalli333
@muthuvalli333 3 жыл бұрын
Awesome...👌
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Thanks 😀
@suryanshgupta7518
@suryanshgupta7518 2 жыл бұрын
Thankyou..
@AmritAgarwal07
@AmritAgarwal07 3 жыл бұрын
Rajat can you tell me the name of the video in which you told about the memorization
@AmritAgarwal07
@AmritAgarwal07 3 жыл бұрын
i got Ones and Zeroes | Live Coding with Explanation | Leetcode - 474
@darshanp526
@darshanp526 3 жыл бұрын
Do you use manim for animation?
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
We use powerpoint.
@Weirdvloggertrue
@Weirdvloggertrue 3 жыл бұрын
Could you please suggest me whether I should go for java or Cpp for data structures?
@Weirdvloggertrue
@Weirdvloggertrue 3 жыл бұрын
Please reply
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Both are good choices. as we have not worked on CPP that much, we cannot comment on that.
@Weirdvloggertrue
@Weirdvloggertrue 3 жыл бұрын
@@AlgorithmsMadeEasy thank you
@akki_gamingzone
@akki_gamingzone 2 жыл бұрын
where your reducing the ladder available?
@rhythmbhatia8906
@rhythmbhatia8906 2 жыл бұрын
We are increasing size of heap by pushing the jump differences where ladders were used! So, decreasing no. of ladders or increasing size mean the same.
@shreyashtech8556
@shreyashtech8556 5 ай бұрын
thanx a lot
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 ай бұрын
Most welcome!
@AmritAgarwal07
@AmritAgarwal07 3 жыл бұрын
faster PriorityQueue maxHeap = new PriorityQueue(new Comparator() { public int compare(Integer a, Integer b) { return b - a; } }); int n = heights.length; int i = 1; int leftBricks = bricks; for(;i < n; i++) { if(heights[i] = diff) { leftBricks -= diff; maxHeap.offer(diff); } else if(ladders > 0) { ladders--; if(!maxHeap.isEmpty() && maxHeap.peek() > diff) { leftBricks = leftBricks + maxHeap.poll() - diff; maxHeap.offer(diff); } } else { break; } } return i - 1;
Furthest Building You Can Reach - Leetcode 1642 - Python
11:08
NeetCodeIO
Рет қаралды 15 М.
Rotate Image | Live Coding with Explanation | Leetcode - 48
10:12
Algorithms Made Easy
Рет қаралды 8 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 8 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 104 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 31 МЛН
Maximum Value at a Given Index in a Bounded Array | Leetcode - 1802
18:19
Algorithms Made Easy
Рет қаралды 1,5 М.
Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
15:18
Fullstack Academy
Рет қаралды 362 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
Leetcode 1642. Furthest Building You Can Reach
24:23
Code with Alisha
Рет қаралды 3,5 М.
Champagne Tower - Leetcode 799 - Python
13:48
NeetCodeIO
Рет қаралды 11 М.
PhD AI student explains how China already have won in AI..
13:28
livinlavidaluke
Рет қаралды 51 М.
How to: Work at Google - Example Coding/Engineering Interview
24:02
Life at Google
Рет қаралды 7 МЛН
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 408 М.
How Many Numbers Are Smaller Than the Current Number | Leetcode - 1365
6:16
Algorithms Made Easy
Рет қаралды 2,4 М.
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН