explanations of each sections are very well!!!, Understood all concepts in this video.
@animani54219 ай бұрын
bhaiya u r simply the best, aap hashing aur hash map wale questions bhi karva dena pls.
@Manav001218 ай бұрын
everything is well and good master of DSA
@ManojSinghRawat-x2w8 ай бұрын
bhaiya me kaha minheap ke liye bhi solve karo , I said challenge accepted 😎 // lets try this question using separation of declaration and definition #include using namespace std; class minHeap { int *arr; int size; int total_size; public: minHeap(int n) { total_size = n; size = 0; arr = new int[n]; } // insert a new element into the min heap void insert(int x); // print the heap void print(); // heapifying the heap void heapify(int i); // delete the root element of the heap void deleteRoot(); }; void minHeap::insert(int x) { if (size == total_size) { cout arr[i]) { swap(arr[i], arr[(i - 1) / 2]); i = (i - 1) / 2; } cout
@bepositive.292 ай бұрын
Very disappointed to see the number of likes as compare to views😢😢😢। Bhaiya deserves more likes. Guys please like the video
@PrathitGurjar5 ай бұрын
धन्यवाद मेरे बड़े भैया और गुरू 🙏🙏🙏
@Kanishk-nx4xg4 ай бұрын
Code for MinHeap -- > #include using namespace std; class MinHeap { int* arr, size, totalSize; public: MinHeap(int s) { arr = new int[s]; size = 0; // number of value in our MinHeap at present totalSize = s; // maximum number of elements that can be present in our MinHeap } void insert(int value) { if(size == totalSize) { cout 0 && arr[(index-1)/2] > arr[index]) { swap(arr[index], arr[(index-1)/2]); index = (index-1)/2; } cout
@heetpatel30376 ай бұрын
Jai shree Ram ❤️ Ek dum OP content Hard concept ko easy banane wale ko Rohit bhaiya kehte hai ✌️👑
@study-yd6es16 күн бұрын
Amazing Explaination Bro! Keep uploading these type of lecture
@sonumondal779820 күн бұрын
chamak gaya bhaiya ❤❤🙏🙏
@allinonemoviesyt9 ай бұрын
1:30:29 Homework Implementation of Min Heap #include using namespace std; class MinHeap{ int *arr; int size,capacity; void Heapify(int index){ int smallest = index; int left = index*2+1; int right = index*2+2; if(left
@allinonemoviesyt9 ай бұрын
Good morning Bhaiya ji ❤
@Codekeshri9 ай бұрын
Happy Holi Bhaiya🎉, maza aa rha h advance DSA mein....aap ke jaise teacher har clg mein hone chahiye
@pranavmittal96199 ай бұрын
College berojgaar banane ki factory hoti h waha bhaiya kaise aa sakte h warna sabko rojgaar nahi mil jaayega 😂😂😂
@Codekeshri9 ай бұрын
@@pranavmittal9619 haan but demand hi Kam ho jab to kahin bhi berojgaar hi dikhenge ....chahe kuch bhi seekho
@bharatmalik27569 ай бұрын
Bhaiya itna simplify krke kase samjha dete ho 🙂
@ManishKumar-rd2iy4 ай бұрын
Wow what a explanation 😊😊😊🎉
@divyanshsharma6739 ай бұрын
Heap chamak gya acche se ✅🔥
@amorphous88262 ай бұрын
Thank you sir👍
@StudyYuv5 ай бұрын
ty sir you explained the concept very nicely,🙏🙏
@umeyr72258 ай бұрын
excellent! thank you so much
@Vintage_StufАй бұрын
tc will be O(1) in best case and wrost case(log n) height of bt
@rejaulislam25933 ай бұрын
mashallah.....vaiya luv hai hamara
@GghiggFfhhhfАй бұрын
Bhaiya agar delete bale me last aur first ko swap karde aur size na decrease kare to hum ko print karne pe sorted array mil jayega
@GauravKumar-jw3fu9 ай бұрын
SEcond ALakh Sir ❤
@altafashraf25983 күн бұрын
Min heap done.👍
@abhinayjangde4 ай бұрын
Max Heap and Min Heap Implementation in Python class MaxHeap: def __init__(self,n): self.arr=[None] * n self.size=0 self.totol_size=n def push(self,val): if self.size==self.totol_size: print("Heap Overflow ") return self.arr[self.size]=val index = self.size self.size+=1 while index>0 and self.arr[(index-1)//2] < self.arr[index]: self.arr[(index-1)//2],self.arr[index]=self.arr[index],self.arr[(index-1)//2] index=(index-1)//2 def heapify(self,index): largest = index left = 2*index+1 right = 2*index+2 if leftself.arr[largest]: largest = left if rightself.arr[largest]: largest = right if largest!=index: self.arr[index],self.arr[largest]=self.arr[largest],self.arr[index] self.heapify(largest) def remove(self): if self.size == 0: print("Heap Underflow ") return self.arr[0]=self.arr.pop(self.size-1) self.size-=1 index=0 self.heapify(index) def show(self): for item in self.arr: if item is not None: print(item,end=" ") print() # heap = MaxHeap(6) # heap.push(4) # heap.push(14) # heap.push(2) # heap.push(20) # heap.push(90) # heap.remove() # heap.show() class MinHeap: def __init__(self,n): self.arr = [None] * n self.size = 0 self.total_size = n def push(self, val): if self.size==self.total_size: print("Heap Overflow ") return self.arr[self.size]=val index = self.size self.size+=1 while index>0 and self.arr[(index-1)//2] > self.arr[index]: self.arr[(index-1)//2], self.arr[index]=self.arr[index],self.arr[(index-1)//2] index = (index-1)//2 def show(self): for item in self.arr: if item is not None: print(item,end=" ") print() def heapify(self,index): smallest = index left = 2*index+1 right = 2*index+2 if left
@pranavmittal96199 ай бұрын
Heap ko apne dimag ki memory stack me push kar diya
@AMITKUMAR-ds4hp9 ай бұрын
Good morning boss ❤❤❤
@YashSaini0079 ай бұрын
Bhaiya aap dsa ke baad web development start karoge aapne kaha tha usme 4 months lagege . Bhaiya fir uske baad block chain development me kitna time lagega.
@Sumit-wy4zp9 ай бұрын
Bhai mera to 4th year end ho jayega.. mera ky hoga mujhe blockchain technology pe project banana hai
@CoderArmy99 ай бұрын
Karte hai sab kuch, don't worry
@pranavmittal96199 ай бұрын
Yash Bhai kitna karoge pehle DSA toh ache se kar lo utne me hi naukri lag jaayegi
@AyushSinha-l1q8 ай бұрын
@@CoderArmy9Thanks Bhaiya ❤
@Manav001218 ай бұрын
@@CoderArmy9 Rohit bhaiya or mere pass only 1 year hai blockchain ko seekhne ke liyea , kuch karyea na aap please i also want to make projects using Blockchain development..
@shrishtdev99619 ай бұрын
mast bhaiya ❤
@sayyedtaimoorshah63459 ай бұрын
overPower brother
@ariyansardar39655 ай бұрын
Best video ever
@King300799 ай бұрын
Good morning bhaiya ❤
@b.kkumardutt44809 ай бұрын
Bhaiya GATE DA ke syllabus me programming in python hai aur me abhi IIT JAM Crack kiya hue aur me gate da ka preparation karna chahta hu but mujhe coding ka basis idea bhi nhi hai So please bhaiya python ka ek complete series laiye from basic jish se college me bhi help ho aur gate da preparation me bhi....🙏🙏🙏🙏
@viprings97556 ай бұрын
bhaiya aapka dil se shukriya
@RanjanSingh-wl8zt7 ай бұрын
//min heap -- nice lecture bhaiya #include using namespace std; class MinHeap { // creation - 0(n*logn) int *arr; int size; int total_size; public: MinHeap(int n) { arr = new int[n]; size = 0; total_size = n; } // insertion void insert(int x) { // check full cond if (size == total_size) { cout 0 && arr[index] < arr[(index - 1) / 2]) { swap(arr[index], arr[(index - 1) / 2]); index = (index - 1) / 2; } } // print the minHeap void print() { for (int i = 0; i < size; i++) { cout
@Ajeetkumar123299 ай бұрын
Bhaiya mai time complexity me confuse hu pahle mai insert ele in max heap O(logn) padha tha pr aapne O(nlogn) bataye plz bhaiya clarify it
@CoderArmy99 ай бұрын
One Element ko Insert karane ki time Complexity logn hai, Heap ko Build karna ka time Complexity nlogn bola hai bhai, kynki agar N element hai, toh N insert karne padenge.
@Ajeetkumar123299 ай бұрын
@@CoderArmy9thanks bhaiya to solve my doubt ❤❤❤❤
@YashSaini0079 ай бұрын
Bhaiya Radhe Radhe 🙏
@vaishalichoudhary59 ай бұрын
HOME WORK : CREATION OF MIN_HEAP :) #include using namespace std; class Min_Heap { private: int size; int total; int *arr; public: Min_Heap(int n) { size = 0; total = n; arr = new int[n]; } ~Min_Heap() { delete[] arr; } // insert the value void insert(int a) { // size is euqal to total that means min_heap is completly filled if (size == total) { cout
@ronenx6349Ай бұрын
bhai ap goat ho
@kartikbohra19047 ай бұрын
Min Heap Just Small Changes //Min Heap Creation & Deletion #include #include using namespace std; int getParent(int i) { return (i-1)/2; } class MinHeap{ int *arr; int size;//curr size of heap int totalSize;//size in total of arr public: MinHeap(int n) { arr=new int[n]; size=0; totalSize=n; } void insert(int elem) { if(size==totalSize) { cout
@mehwishzehra1356Ай бұрын
kinggkinggkingg😭❤️
@pankajdubey11239 ай бұрын
bhaiya map or set pe problem nahi karvayi aapne jo kal padhaya tha stl
@CoderArmy99 ай бұрын
Wo sab hga, don't worry....
@pankajdubey11239 ай бұрын
ok bhaiya ... thanks bhaiya for DSA high level content @@CoderArmy9
@suyashtripathi18183 ай бұрын
From❤ thanku so much bhaiya bahut video dekha per wha per deletion me sb confuse kr rhe the thnaku again
@abhinayjangde4 ай бұрын
Challenge Min Heap in Implementaion in Python class MinHeap: def __init__(self,n): self.arr = [None] * n self.size = 0 self.total_size = n def push(self, val): if self.size==self.total_size: print("Heap Overflow ") return self.arr[self.size]=val index = self.size self.size+=1 while index>0 and self.arr[(index-1)//2] > self.arr[index]: self.arr[(index-1)//2], self.arr[index]=self.arr[index],self.arr[(index-1)//2] index = (index-1)//2 def show(self): for item in self.arr: if item is not None: print(item,end=" ") print() def heapify(self,index): smallest = index left = 2*index+1 right = 2*index+2 if left
@Mishra_ritesh9 ай бұрын
Happy Holi Rohit bhaiya ❤❤🌈🌈 Bhaiya aaj aap sabka comment par like kar rahe ho..Mera bhi kar dena ❤
@pranavmittal96199 ай бұрын
Bhai ye LGBTQ wala sign kyu lagaya h lagta h tum bhi issi section ke lagte ho
@Mishra_ritesh9 ай бұрын
@@pranavmittal9619 nhi sanjha LGBTQ kya hai
@shreyadenre8164Ай бұрын
How much time is needed to complete dsa in order to start cp? Pls help. This playlist is never getting finished😢
@Gamerz-g4iАй бұрын
6-12 months
@Dipzeus9 ай бұрын
Bhaiya computer networks on the perspective of interview padhaiyega
@pranavmittal96199 ай бұрын
Thoda bahut khud bhi kar le tutorial point ki website per tutorial h waha se chala complete kar le warna Neso Academy or Gate Smashers
@hiteshsharma50349 ай бұрын
👏👏👏👏
@top10shorts215 ай бұрын
#include using namespace std ; class Maxheap{ int* arr; int size ;// the total elements in the heap ; int total_size ; // the size of the array ; public: Maxheap(int n){ arr = new int[n]; size = 0 ; total_size = n ; } // Heapify void Heapify(int index){ int largest = index ; int left = 2*index +1 ; int right = 2*index +2 ; if(left
@seekingsoul8718 ай бұрын
Bhaiya chamak gaya
@the_code_chic9 ай бұрын
implementation of Min Heap #include using namespace std; class minheap{ int *arr; int size; int total_size; public: minheap(int n){ arr=new int[n]; size=0; total_size=n; } // insertion in heap void insert(int value){ // heap ki size check krna jagah bachi h ya nhi if(size==total_size){ cout
@rahulsahu43678 ай бұрын
Min HEap Implentaion #include #include using namespace std; class MinHeap{ private: int *arr; int size; int total_size; public: // Constructor to create a min heap of given 'total_size' MinHeap(int n){ arr=new int[n]; total_size=n; size=0;//initialization } void insert(int value){ //base case if(size==total_size){ cout
@Aryan-wl7mc9 ай бұрын
Morning bhaiya
@harshmajithiya64177 ай бұрын
class MinHeap { int total_size; // total size of heap(max elements) int size = 0; // current number of elements in heap int[] arr; MinHeap(int n) { this.total_size = n; arr = new int[this.total_size]; } public void insert(int element) { if(size == total_size) { System.out.println("heap is already full can not insert"); } else { arr[size] = element; int index = size; size = size + 1; swapWithParent(index); } } public void swapWithParent(int index) { int indexOfParent = (index - 1) / 2; if(arr[indexOfParent] > arr[index]) { int temp = arr[index]; arr[index] = arr[indexOfParent]; arr[indexOfParent] = temp; swapWithParent(indexOfParent); } } public void print() { for (int i = 0; i < size; i++) { System.out.print(arr[i] + "[" + i + "]" + " "); } System.out.println(); } public void delete() { if(size == 0) { System.out.println("Heap underflow"); return; } System.out.println(arr[0] + " deleted from heap"); arr[0] = arr[size - 1]; size--; if(size == 0) { return; } else { heapify(0); } } public void heapify(int index) { int child1Idx = index * 2 + 1; int child2Idx = index * 2 + 2; if((child1Idx < size && arr[index] > arr[child1Idx]) || (child2Idx < size && arr[index] > arr[child2Idx])) { if(arr[child1Idx] < arr[child2Idx]) { int temp = arr[index]; arr[index] = arr[child1Idx]; arr[child1Idx] = temp; heapify(child1Idx); } else { int temp = arr[index]; arr[index] = arr[child2Idx]; arr[child2Idx] = temp; heapify(child2Idx); } } } } public class Main { public static void main(String[] args) { MinHeap h1 = new MinHeap(10); // h1.insert(6); h1.insert(4); h1.insert(14); h1.insert(11); h1.insert(114); h1.insert(24); h1.insert(1); h1.insert(10); // h1.insert(51); // h1.insert(780); // h1.insert(20); // h1.insert(10); h1.print(); h1.delete(); h1.delete(); h1.delete(); h1.delete(); h1.delete(); h1.delete(); h1.delete(); h1.delete(); h1.print(); } }
@marufhasan37826 ай бұрын
best
@AmitKumar-oj1vsАй бұрын
sir paid course kab ayega c++ ka
@shree_2759 ай бұрын
good mor bhaiya
@YogeshwarGupta-r3u8 ай бұрын
minHeap #include //#include using namespace std; class minHeap{ int *arr; int size; // total elememnt in heap int total_size; //total size of array public: minHeap(int n){ arr=new int[n]; size=0; total_size=6; } //insert in heap void insert(int value){ //if heapsize is available or not if(size==total_size){ cout
@itshirdeshk9 ай бұрын
Day 182 ✅🔥
@Maisha-ty5rr9 ай бұрын
182 days kase hay, 121 days hay na?
@itshirdeshk8 ай бұрын
@@Maisha-ty5rr ye jabse start hua hai course tabse lekar ab Tak ke days hain
@zafrul_islam8 ай бұрын
Done✅✅✅✅
@OnlyPc-c9n4 ай бұрын
can anybody share the notes of prev. class
@yashedits34662 ай бұрын
Previous class hi nahi tha yahi first class he
@atikasheikh90345 ай бұрын
Min heap k lye b kri
@PradeepKumar-bc1ez4 ай бұрын
Your fees 😊
@sachinprajapati8159 ай бұрын
#include using namespace std; class MinHeap { int total_size; public: int *arr; int size; MinHeap(int n) { arr = new int[n]; size = 0; total_size = n; } void insert(int value) { if (size == total_size) { cout
@MohammadShadab-qj3hb5 ай бұрын
bhaiya please provide us the notes slides please
@gajendrasinghdhaked6 ай бұрын
🤩
@YashSaini0079 ай бұрын
Day 182 #180DaysOfCode
@Maisha-ty5rr9 ай бұрын
182 days kase hay, 121 days hay na?
@YashSaini0079 ай бұрын
@@Maisha-ty5rr 182 din hai. 120 Lecture hai. Weekend me lecture nhi aate . Do din Bhaiya revision ke liye dete hai. Or Bhaiya ko apne startup par bhi kaam karna padta hai. Bhaiya bohot mehnat karte hai sote bhi nhi hai lecture ki wajah se.
@Jv_Singh379 ай бұрын
kkar diya like
@Aniruddha_Mukherjee9 ай бұрын
❤❤
@MeharRehan-t9b14 күн бұрын
chamka diya bro
@AlienBoys3029 ай бұрын
Web , app ai development bhi start karo 👍
@pranavmittal96199 ай бұрын
DSA kar liya kya ? 😂
@AlienBoys3029 ай бұрын
@@pranavmittal9619 nahi sirf sapne dekh raha hu 😅
@Abc-rz4ps6 ай бұрын
Oh sir jee OS padha do please
@TuteDude9 ай бұрын
Bhaiya Mere College me ek meet-up karo na please... Rabindranath Tagor University Bhopal Mp
@ravi181319 ай бұрын
#180daysofcode
@prabhatkumar-kh7xx9 ай бұрын
hw solution class minheap{ int *arr; int size; int total_size; public: minheap(int n){ arr =new int[n]; size=0; total_size=n; } void insert(int value){ if(size==total_size){ cout
@Rahul-cn8bq4 ай бұрын
heap++
@ramrakesh14879 ай бұрын
bhai avl khatam hua kya
@pranavmittal96199 ай бұрын
Hao Bhai do video h AVL k or bahut h
@asad_iliyas6 ай бұрын
H/W => #include using namespace std; class minHeap { int *arr; int size; int totalSize; public: minHeap(int n) { arr = new int[n]; size = 0; totalSize = n; } void insert(int n) { if (size == totalSize) { cout arr[index]) { swap(arr[(index - 1) / 2], arr[index]); index = (index - 1) / 2; } cout