Heap 6 Interview Problem | Height of Heap | Minimum Cost of ropes | Magician and Chocolates

  Рет қаралды 11,415

Coder Army

Coder Army

Күн бұрын

Пікірлер: 127
@mohit6215
@mohit6215 9 ай бұрын
This man from IIT GUWAHATI IS SHAPING OUR FUTURE ❤❤
@MrAnon07
@MrAnon07 9 ай бұрын
Really helpful videos♥ 1:21:48 Last tak
@utkarshsingh09
@utkarshsingh09 Ай бұрын
For students coming to see review of his videos "I gotta tell you, It was perfect. Perfect. Everything, down to the last minute details.
@ShivshankarKumaryadav-m4f
@ShivshankarKumaryadav-m4f 20 күн бұрын
1:21:56 last take Thanks bhaiya and thanku coder army
@allinonemoviesyt
@allinonemoviesyt 9 ай бұрын
00:02 Understanding and solving heap related problems 02:23 Understanding the concept of heap height in detail 06:55 Understanding the height formula of the heap 09:07 Logic behind multiple divisions and height calculation 13:25 Finding minimum cost of connecting ropes 15:31 Finding the minimum cost of connecting ropes 22:03 Explaining the process of shifting elements in solving a problem 25:48 Shifting elements to maintain order in a heap 28:01 Understanding and using Min Heap in priority 31:58 Priority order for inserting and removing elements in a heap 33:49 Efficiently perform log operations and cost calculations 37:35 Optimizing insertion process using priority queue 39:16 Creating and using heaps to solve problems 43:21 Magician demonstrating a chocolate eating trick with a twist 45:20 Solving chocolate distribution problem with strategic approach 49:10 Implementing a heap and sorting the elements 51:02 Understanding time complexity of heap operations 54:48 Understanding the time complexity of heap operations 56:26 Implementing priority queue utilizing heap for maintaining a min heap structure. 1:00:11 Selecting the heaviest stones based on weight. 1:02:02 Collision of stones in a heap 1:05:48 Explanation of the process of removing elements from a heap 1:07:23 Returning the top element of a priority queue after certain operations. 1:11:26 Maximize profit by selecting and selling seats strategically 1:13:21 Select the maximum value and perform delete and insert operations simultaneously. 1:16:56 Understanding and implementing heap data structure 1:18:50 Implementation of a heap algorithm
@CoderArmy9
@CoderArmy9 9 ай бұрын
Thanks
@study-yd6es
@study-yd6es 15 күн бұрын
Amazing Lectures!! This playlist is going to boom so much in the future
@anshror2583
@anshror2583 8 ай бұрын
Bro has some serious teaching skills wow well done rohit bhaiya
@bharatmalik2756
@bharatmalik2756 9 ай бұрын
Bhaiya OP content and mind blowing explanation 😼
@rajnishrajain5003
@rajnishrajain5003 5 ай бұрын
NO ONE CAN GIVE THIS LEVEL OF EXAPLATION🔥🔥
@asad_iliyas
@asad_iliyas 6 ай бұрын
Bhaiya you have increased our level so much that now these easy questions doesn't excites me. Please do some hard level questions.
@pranavmittal9619
@pranavmittal9619 9 ай бұрын
Learning : every second important just go with the flow and embrace in mind and make notes and do revision
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
Last Stone Weight : _________________________________________________ int lastStoneWeight(vector& stones) { priority_queue q; for (int i = 0; i < stones.size(); ++i) { q.push(stones[i]); } int first = 0; int second = 0; while (q.size() > 1) { first = q.top(); q.pop(); second = q.top(); q.pop(); int dif = abs(first - second); if (dif > 0) { q.push(dif); } } return (q.size() > 0 ? q.top() : 0); }
@be_a_DT
@be_a_DT 7 ай бұрын
Really helpful videos 1:21:48 Last tak
@sonumondal7798
@sonumondal7798 17 күн бұрын
maja aa gaya bhaiya sare problem khud se solve ho gye heap padhne ke baad❤❤
@nikhilrai6373
@nikhilrai6373 Ай бұрын
your DSA course is more comprehensive than others ❤❤
@sumangoswami576
@sumangoswami576 4 ай бұрын
last tak dekh liya bhaiya bhot badiya lecture the 🙂🙂🙂
@heetpatel3037
@heetpatel3037 6 ай бұрын
Jai shree Ram ❤️ ek dum OP content bhaiya what an explanation. :::))
@rajurock9479
@rajurock9479 3 ай бұрын
Nice ❤❤ best series on heap concept chamka gaya
@SeetaramSharma-ku7oy
@SeetaramSharma-ku7oy 4 ай бұрын
Seriously teaching no backwas Rohit bhaiya ki jay ho
@aakashy_07
@aakashy_07 3 ай бұрын
Thankyou bhaiya.. Priority queue✅🤙🏻
@divyanshsharma673
@divyanshsharma673 9 ай бұрын
Great Lecture as always !! 🔥🗿
@sachinprajapati815
@sachinprajapati815 9 ай бұрын
last stone weight came in my drive question but i did not know priority queue so I could not solve it. thank you bhaiya ❤❤.
@CoderArmy9
@CoderArmy9 9 ай бұрын
Ab lag rha hga, ye toh bacho wala question th..
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
Problem 6 : ___________________________________________________ int Solution::solve(vector &A, int B) { priority_queue q; for(int i = 0; i
@ranjeetguptaiitm2852
@ranjeetguptaiitm2852 9 ай бұрын
very nice explanation🥰🥰
@Sanataniblood-mb5pu
@Sanataniblood-mb5pu 5 ай бұрын
Thanks bhaiya ❤️🙏🏻 Another wonderful lecture bhaiya ❤❤
@dhruv12151
@dhruv12151 5 ай бұрын
Superb lecture bhaiya 👍👍👍👍👍
@Child-game-1
@Child-game-1 3 ай бұрын
wonderful sir
@zafrul_islam
@zafrul_islam 7 ай бұрын
Bhaiya maja aa gya array and heap wala concept sikh kar ke ki kb array ka use karna hai and kb heap ka 🔥🔥🔥🔥
@AbhinavShinde-gr4bt
@AbhinavShinde-gr4bt 5 ай бұрын
superb lecture
@vinodbarti9237
@vinodbarti9237 7 ай бұрын
Thnks Bhaiya Able To Solve 2 Question By Self 😀😀
@aakankshasharma-h7f
@aakankshasharma-h7f 7 ай бұрын
Bhaiya you are really amazing .Thankyou so much
@rejaulislam2593
@rejaulislam2593 3 ай бұрын
last tak...alhamdulillah...may allah bless u
@Sanataniblood-mb5pu
@Sanataniblood-mb5pu 5 ай бұрын
1:21:58 Last tak ❤❤
@SUN_SUN2
@SUN_SUN2 5 ай бұрын
last tak Amazing lec
@punitsharma584
@punitsharma584 3 ай бұрын
nyc completed this
@shubhamkumarjha9192
@shubhamkumarjha9192 9 ай бұрын
Good evening bhaiya ji. 💖
@akshaythakur4231
@akshaythakur4231 8 сағат бұрын
Wow ❤❤
@Ramankumar-lo4hv
@Ramankumar-lo4hv 3 ай бұрын
chamak chuka hh bhaiya ji😁
@utkarshsingh09
@utkarshsingh09 Ай бұрын
1:21:53 Last Tak 🎉
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
Problem 5 : ____________________________________________ /* function parameter names have been changed for simplicity */ long long pickGifts(vector& B, int A) { priority_queue q; long long sum = 0; for(int i = 0; i
@virvalgyan4263
@virvalgyan4263 3 ай бұрын
@arnavgupta5830
@arnavgupta5830 Ай бұрын
class Solution{ public: int heapHeight(int N, int arr[]){ // code here int height=-1; for(int i=0; i
@dayashankarlakhotia4943
@dayashankarlakhotia4943 9 ай бұрын
static int heapHeight(int N,int[]arr){ return (int)(Math.log(N)/Math.log(2)); }
@Vardanaggarwal
@Vardanaggarwal 8 ай бұрын
amazing.
@GauravKumar-jw3fu
@GauravKumar-jw3fu 9 ай бұрын
RAdhe- RAdhe BHaiya Ji❤
@YashSaini007
@YashSaini007 9 ай бұрын
Bhaiya Radhe Radhe 🙏
@ankitchoudhary2914
@ankitchoudhary2914 8 ай бұрын
LOved 2Days' class
@Noobiee_FPS
@Noobiee_FPS 8 ай бұрын
last tak dekh ke smjh aa gya bhaiya kab heap ko use krna h
@amannegi1817
@amannegi1817 4 күн бұрын
Chamakgya bheji❤
@chanchalsoni7535
@chanchalsoni7535 5 ай бұрын
aap nahi hote to itne hajaro learners ka kya hota🥺🥺.....#lifeSaviour😇
@AbhishekKumar-lp7wy
@AbhishekKumar-lp7wy 9 ай бұрын
Good night bhaiya ji
@divyanshsharma673
@divyanshsharma673 9 ай бұрын
लास्ट तक 🎉
@AnshuKumari-gz7ju
@AnshuKumari-gz7ju 22 күн бұрын
thank u bhaiya
@RJFF3-r7w
@RJFF3-r7w 8 сағат бұрын
last tak,pura chamak gaya...
@manish_kumar_iitg
@manish_kumar_iitg 2 ай бұрын
Problem 5:- long long pickGifts(vector& gifts, int k) { priority_queuep; for(long long i = 0; i< gifts.size(); i++){ p.push(gifts[i]); } while(k--){ p.push(sqrt(p.top())); p.pop(); } long long ans = 0; while(!p.empty()){ ans += p.top(); p.pop(); } return ans; }
@vijaysingh-n6p9j
@vijaysingh-n6p9j Ай бұрын
bhaiya mja aa gya
@Sumit-wy4zp
@Sumit-wy4zp 8 ай бұрын
Rohit Bhai Please project ke upper ek video chahiye . pichle 1 saal se dsa kar raha hun but projects ka koi idea nahi hai. abhi 6th sem me hun.. bahut demotivate feel kar raha hun
@zafrul_islam
@zafrul_islam 7 ай бұрын
@CoderArmy9 haan bhaiya please
@saketjaiswalSJ
@saketjaiswalSJ 7 ай бұрын
hacker or wott thanks bhai
@sbworld13
@sbworld13 9 ай бұрын
❤️✨🔥
@YashSaini007
@YashSaini007 9 ай бұрын
Day - 184 #180DaysOfCode
@heetsheth6402
@heetsheth6402 6 ай бұрын
Last Tak ❤❤❤❤
@heetpatel3037
@heetpatel3037 6 ай бұрын
Last tak ❤️
@kuldeepparmar9861
@kuldeepparmar9861 8 ай бұрын
last tk chamak gya
@Xcoder__1957
@Xcoder__1957 2 ай бұрын
@allinonemoviesyt
@allinonemoviesyt 8 ай бұрын
1:10:11 Homework Question class Solution { public: long long pickGifts(vector& gifts, int k) { priority_queue pq; for(int i:gifts) pq.push(i); while(!pq.empty() && k--){ pq.push(floor(sqrt(pq.top()))); pq.pop(); } long long ans = 0; while(!pq.empty()){ ans += pq.top(); pq.pop(); } return ans; } };
@itshirdeshk
@itshirdeshk 8 ай бұрын
Day 184 ✅🔥
@mohit6215
@mohit6215 9 ай бұрын
last tak kon kon tha
@deepfan14
@deepfan14 9 ай бұрын
Bro is this is good or not
@deepfan14
@deepfan14 9 ай бұрын
Should I do this or course of c++ by codehelp-by babbar
@mohit6215
@mohit6215 8 ай бұрын
It is awesome ❤
@JHARAJESHRAMAN
@JHARAJESHRAMAN 8 ай бұрын
bhaiya JS ka badle full stack development jo bhi sahi rahe vo launch kardo aap🙏
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
problem no : 1 ______________________________________ long long minCost(long long arr[], long long n) { // Your code here priority_queue pq; long long int ans = 0; for(int i = 0; i 1) { first = pq.top(); pq.pop(); second = pq.top(); pq.pop(); ans+=first+second; pq.push(first+second); } return ans; }
@ManojSinghRawat-x2w
@ManojSinghRawat-x2w 8 ай бұрын
last tak😎
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
🥰🥰
@pranavmittal9619
@pranavmittal9619 9 ай бұрын
Last Tak 🎉 vo bhi bina skip kare
@tradun.s9760
@tradun.s9760 5 ай бұрын
last tak 🤟🤟
@AMITKUMAR-ds4hp
@AMITKUMAR-ds4hp 9 ай бұрын
Hi boss
@ShubhamKumar-vk8me
@ShubhamKumar-vk8me 8 ай бұрын
Chamak gaya bhaiya
@akashparashar1851
@akashparashar1851 5 ай бұрын
antim tak
@OnlyPc-c9n
@OnlyPc-c9n 4 ай бұрын
last tak ❤
@pankajdubey1123
@pankajdubey1123 9 ай бұрын
thinking process ++++++
@Aniruddha_Mukherjee
@Aniruddha_Mukherjee 9 ай бұрын
last tak 🤩
@anuragpandey715
@anuragpandey715 9 ай бұрын
last tak 🤗🤗🤗🤗🤗🤗
@deepfan14
@deepfan14 9 ай бұрын
I am think to try this course can plz some one tell me that does this course teach you all concept with in-depth knowledge
@CoderArmy9
@CoderArmy9 8 ай бұрын
Bro aap first lecture dekh lo, aapko answer mil jaayega..
@deepfan14
@deepfan14 8 ай бұрын
Thanks ❤
@wisdomMate
@wisdomMate 9 ай бұрын
Chamka++
@NitinSingh-zy8io
@NitinSingh-zy8io 6 ай бұрын
QUESTION:1 MOST UNIQUE SOLUTION ALL OVER THE INTERNET class Solution{ public: int heapHeight(int N, int arr[]){ // code here int count=0; for(int i=1;i
@maheshpatil1750
@maheshpatil1750 3 ай бұрын
last tak.....😁
@VivekGupta-rw6oo
@VivekGupta-rw6oo 9 ай бұрын
Bhaiya last tak
@darshanrathod-c1h
@darshanrathod-c1h 9 ай бұрын
@Rahul-cn8bq
@Rahul-cn8bq 4 ай бұрын
heap++
@kirankarakalli1408
@kirankarakalli1408 9 ай бұрын
Lasttak
@vaishalichoudhary5
@vaishalichoudhary5 9 ай бұрын
Last tk:)
@defenceboimotivation
@defenceboimotivation 6 ай бұрын
lasttak
@vivekpaliwal1876
@vivekpaliwal1876 7 күн бұрын
Aap q.top() and q.pop() Do steps me kyu krte ho? Simple ek line me ho skta h...q.pop() likho bss
@avinash2421
@avinash2421 9 ай бұрын
Last Tak
@SmritiSharma-vv7ib
@SmritiSharma-vv7ib 3 ай бұрын
Last tak bro
@anuragrajput4613
@anuragrajput4613 8 ай бұрын
Last tak
@nepalihoni9213
@nepalihoni9213 5 ай бұрын
op op
@PradeepKumar-bc1ez
@PradeepKumar-bc1ez 4 ай бұрын
Last tk
@pankajdubey1123
@pankajdubey1123 9 ай бұрын
last tak
@jagriti4813
@jagriti4813 9 ай бұрын
Brother ik TRIES topic in c pr bhi vdo needed h.@coderarmy
@CoderArmy9
@CoderArmy9 9 ай бұрын
Tries, segment tree , fenwick Tree last mein cover hga, don't worry...
@harshitpatil6138
@harshitpatil6138 5 ай бұрын
Last tak❤
@parthpath2672
@parthpath2672 8 ай бұрын
Last tak
@balramsinghjadon822
@balramsinghjadon822 3 ай бұрын
Last tk
Heap Sort | Build Heap in C++ | Priority Queue
1:19:47
Coder Army
Рет қаралды 20 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Knuth-Morris-Pratt Algorithm Visually Explained
5:39
ByteQuest
Рет қаралды 7 М.
Heap Data Structure | Insertion and Deletion in Max Heap
1:15:24
Coder Army
Рет қаралды 47 М.