i have started watching your videos since previous month and became fan of your hardwork and explanation of each and every step.. especially the effort you put in dry run is phenomenal. Hats off and please keep doing this for students like me ...
thankyouuu so much bhaiya, trees easily smjh mein aagya, bohot easily, and u teach so well aapki jitni tareef kare utni hi kam hai. SIR AAPKA DIL SE BOHOT ZYADA SHUKRIYYA !!
BHHAIIIIIII SAAAAAAB KYA LEVEL OF UNDERSTANDING HAI BHAIYYA AAPKA...........SALUTE TO YOUR EXPLAINATION.................I BECAME A FAN MAINLY WHILE EXPLAINING THE SPACE COMPLEXITY OF TREE......GOD LEVEL......🔥🔥🔥🔥🔥🔥🔥🔥
Bhaiya heaps and hashmaps bhee cover honge n . Course khatam hote hote hr ek topic cover krva dena ❤ Ye course hee hmari last hope hai is se accha content to 2 lac deke nee mil rha 😅
Bro trust me yrr sab cover karenge, heap topic tree ke andar hi aata hai, isly cover hga… baaki ek baar course complete hojaaye, koi topic reh jaaye, fr aap btana, wo bhi cover kar lenge❤️
Level order traversal: queueq; // global declaration Here I have initialized root node address in main() function itself. void level_order_traversal(node * &r){ if(r==NULL) return; coutright) q.push(r->right); q.pop(); level_order_traversal(q.front()); }
class Solution { public: //Function to return the level order traversal of a tree. vector levelOrder(Node* root) { //Your code here vectorans; queueq;//for pushing elements level wise Node *first;//left child address Node *second;//right child address q.push(root); ans.push_back(root->data);//root node element while(!q.empty()) { Node *temp = q.front(); q.pop();//ye address ka data push hogya first=temp->left; if(first) { ans.push_back(first->data); q.push(first);//checking further nodes from first } second=temp->right; if(second) { ans.push_back(second->data); q.push(second);//checking further nodes from second } } return ans;
#User function Template for python3 from queue import Queue class Solution: #Function to return the level order traversal of a tree. def levelOrder(self,root): if root is None: return q = Queue() q.put(root) ans = [] while not q.empty(): temp = q.get() ans.append(temp.data) if temp.left : q.put(temp.left) if temp.right : q.put(temp.right) return ans
//Function to return the level order traversal of a tree. vector levelOrder(Node* root) { //Your code here vectorans; levelWise(root, ans); return ans; }
HOME WORK :) class Solution { public: //Function to return the level order traversal of a tree. void cal(vector&ans,Node *root,queue&q){ if(root==NULL){ return ; } q.push(root); while(!q.empty()){ Node *temp=q.front(); q.pop(); ans.push_back(temp->data); if(temp->left!=NULL){ q.push(temp->left); } if(temp->right!=NULL){ q.push(temp->right); } }
Good morning sir I am new to this channel sir If I purchase the course today at 99 rupees. How long will I get the doubt support for? Will I get certificate if I pay 99 and follow from TH-cam or is there any condition to get certificate?? Pls clarify it as soon as possible sir I mailed ur team but no response
Bhai tree ke andar hi aata hai heaps, iske baad BST, Phir AVL Tree then Heap aayega, Don't worry sab cover hga ek sequence mein. Aur hashing bhi cover hga...
Tree easy hai yrr....
yes!
Haaaa
Vaiya homework sheet mein trees ke problem nhi mile !
aapne easy bnaya hai sir!!
Bhaiya aap padha rahe ho to har topic easy lagta hai ❤❤
Best DSA instructor!
Bhaiya maja aa gya aapse tree padhke ❤❤❤🎉...... bahut hi easy laga sab kuch ....jis tarah se aap samjhate h ........keep it up brother ❤❤🎉🎉🎉
Amazingggg itna acha to paid courses mein b nhi samjhaya gya jitna acha ap ny samjhaya ha
No one makes vedio like you bro great 👍 work by you
Love u bhaiya aap jo pichle sab lecture main smajye hain jitna main padha hu mujhe sab smaj aarha nazar na lag jaye ❤❤❤ love u sir
Thank u for dsa videos very helpful ❤❤
best dsa better than other popular youtube channels
Thanks for explaining the recursion part so intuitively. Loved the video🔥🔥.
i have started watching your videos since previous month and became fan of your hardwork and explanation of each and every step.. especially the effort you put in dry run is phenomenal. Hats off and please keep doing this for students like me ...
Badiya Lecture thsa bhaiya thanks , Code dekhke toh maja hi aa gaya mujhe.
thankyouuu so much bhaiya, trees easily smjh mein aagya, bohot easily, and u teach so well aapki jitni tareef kare utni hi kam hai. SIR AAPKA DIL SE BOHOT ZYADA SHUKRIYYA !!
Thanks aapke pyar ke liye💙
Doing great job bhaiya, you r becoming youth's inspiration.
So far the best explanation ever I watched thank you sir
Best video on trees🎉
Ek dum shaandaar padhaya bhaiya
Space complexity wala section lajaaawaaab.....khod diye pura bhaiyaaaa
best vid! explaining everything in detail, thanks
Okaat of DSA 📉. Confidence 📈 😂😂😂❤
BHHAIIIIIII SAAAAAAB KYA LEVEL OF UNDERSTANDING HAI BHAIYYA AAPKA...........SALUTE TO YOUR EXPLAINATION.................I BECAME A FAN MAINLY WHILE EXPLAINING THE SPACE COMPLEXITY OF TREE......GOD LEVEL......🔥🔥🔥🔥🔥🔥🔥🔥
kya padhate ho bhai , love you bhai ❤❤
What a dsa mentor amazing bhaiya gate wale 😂❤❤❤
Maja a gaya bhaiya..😊
thankyou so much sir for such an amazing lecture, trees is very easy :)
Thanks for the recursion method bhaiya
Bhaiya heaps and hashmaps bhee cover honge n . Course khatam hote hote hr ek topic cover krva dena ❤ Ye course hee hmari last hope hai is se accha content to 2 lac deke nee mil rha 😅
Bro trust me yrr sab cover karenge, heap topic tree ke andar hi aata hai, isly cover hga… baaki ek baar course complete hojaaye, koi topic reh jaaye, fr aap btana, wo bhi cover kar lenge❤️
@@CoderArmy9 ❤️❤️❤️ yes bhaiya app pr to aakh bnd krke trust hai
❤🔥
4: Level Order Traversal:
vector levelOrder(Node* root)
{
//Your code here
vectorans;
queueq;
q.push(root);
while(!q.empty())
{
Node *temp=q.front();
q.pop();
ans.push_back(temp->data);
if(temp->left!=NULL)
{
q.push(temp->left);
}
if(temp->right!=NULL)
{
q.push(temp->right);
}
}
return ans;
}
Looking to start revision after completion of this course
Baap level content🔥🔥🔥🔥
Clear and hanji bhaiya loop goes infinity ♾️ but it distracts
And also good explanation😊😊
Distraction ho rha hai kya sach mein, wo unconsciously ho jaata hai...
Gd mrng bhaiya 🌄
Chamak gya 😊
Bhaiya Radhe Radhe 🙏
thank you bhaiya for such a good content
Beautiful explanation sir 🤩
Aap Padhaoge to Bilkul easy hai Bhaiya 😄
Thank you sir ❤
Amazing lec thenkuu bhaiya :)
Chamka diya❤❤
as always you nailed it bhaiya!!😍😍 one request,, please also add leetcode question link bhaiya☺🙏🙏
Level order traversal:
queueq; // global declaration
Here I have initialized root node address in main() function itself.
void level_order_traversal(node * &r){
if(r==NULL) return;
coutright) q.push(r->right);
q.pop();
level_order_traversal(q.front());
}
Big Fan Bhaiya
AAJ THO AAG LAGA DENGE
Good morning bhaiya ji💖
Good morning bhaiya ❤❤
maja aa gaya bhaiya ji
Good morning boss ❤
Good Morning Bhaiya
thankssss...for ur efforts 😊
Done Bhaiya... Day 150/180 ✅
bro aap computer science ke subjects bhi padha dijiye please , it would be really helpful for everyone
Good morning sir
Sir Next topic DP please
Node ka address return nhi karwa ke humlog binary tree aise bhi create kar skte hai
void makeTree(Node* root)
{
int lval,rval;
cout
Good morning Bhaiya Ji.🥰
Good morning bhaiya
Thank You Bhaiya❤
Easy hai ❤❤
chamak gaya bhaiya
bhaiya mazaa aa gya abb lag rha hai kuch badhiya seekha
Thanks Bhaiya...❤🎉
Baap level explanation❤
Nice video ♥️♥️
Sir pleasr make a video how build logic for problem solving. I want to doing compitative programming but i can not think logically
bhia waiting for the revision strategy 🥲🥲🥲
❤❤❤❤ great
thank you bhaiya
1:24:10 Homework - Level Order Traversal
vector levelOrder(Node* root)
{
//Your code here
queue q;
q.push(root);
vector ans;
while(!q.empty()){
Node *temp = q.front();
q.pop();
ans.push_back(temp->data);
if(temp->left)
q.push(temp->left);
if(temp->right)
q.push(temp->right);
}
return ans;
}
Bhai ,love babbar se dsa padhu ya coder army se🙏
@@rajtiwari8539Bhai kisi se bhi padh lo bas consistent rehna jaroori hai
swaad aa gaya
Jai shri ram ❤️ kya op level concept chamkate ho aapp
HW : level order Traversal
class Solution
{
public:
//Function to return the level order traversal of a tree.
vector levelOrder(Node* root)
{
//Your code here
vector ans;
queueq;
q.push(root);
while(!q.empty()){
Node *temp = q.front();
ans.push_back(temp->data);
q.pop();
if(temp->left != NULL) {
q.push(temp->left);
}
if(temp->right != NULL) {
q.push(temp->right);
}
}
return ans;
}
};
Jai hind sir ❤❤
Haan Ji bhaiya thoda tension chal rha tha isliye consistency brack ho gayi thi par ab track pe aa gayi he♥♥
class Solution
{
public:
//Function to return the level order traversal of a tree.
vector levelOrder(Node* root)
{
//Your code here
vectorans;
queueq;//for pushing elements level wise
Node *first;//left child address
Node *second;//right child address
q.push(root);
ans.push_back(root->data);//root node element
while(!q.empty())
{
Node *temp = q.front();
q.pop();//ye address ka data push hogya
first=temp->left;
if(first)
{
ans.push_back(first->data);
q.push(first);//checking further nodes from first
}
second=temp->right;
if(second)
{
ans.push_back(second->data);
q.push(second);//checking further nodes from second
}
}
return ans;
}
};
#User function Template for python3
from queue import Queue
class Solution:
#Function to return the level order traversal of a tree.
def levelOrder(self,root):
if root is None:
return
q = Queue()
q.put(root)
ans = []
while not q.empty():
temp = q.get()
ans.append(temp.data)
if temp.left :
q.put(temp.left)
if temp.right :
q.put(temp.right)
return ans
class Solution {
static int ArrayListlevelOrder(Node root){
ArrayListans=new ArrayList();
Queueq=new LinkedList();
q.offer(root);
while(!q.isEmpty()){
Node cur=q.poll();
ans.add(cur.data);
if(cur.left!=null)
q.offer(cur.left);
if(cur.right!=null)
q.offer(cur.right);
}
return ans;
}
}
🎉❤
Day 150 done ✅✅✅
Bhaiya kya 12th ke marks M.tech placement mein effect kar sakte hai(in IIT or anywhere)? 60% hai buus 12th mein...🤧
Understood
cout right)
qu.push(temp->right);
}
return;
this is solution of level-order traversal
Method 2 of creating binary tree ka koi naam bhi hai?
Chamak Gya ke CEO ko Ram Ram
😅
Day 150/180 👍👍
Day 150/180
LEVEL ORDER TRAVERSAL GFG solution
void levelWise(Node *root, vector&ans){
queueq;
q.push(root);
while(!q.empty()){
Node *temp = q.front();
q.pop();
ans.push_back(temp->data);
if(temp->left)
q.push(temp->left);
if(temp->right)
q.push(temp->right);
}
}
//Function to return the level order traversal of a tree.
vector levelOrder(Node* root)
{
//Your code here
vectorans;
levelWise(root, ans);
return ans;
}
Sir ap ki bajhe se DSA ka khaf chalagaya baki Raha graph
Bahi java language se vi padha dijiye please
Aur mera to khyal hai ki FIR binary tree create karne ke aur bhi tarike hote honge aapane sirf do karvaya
Like 👍👍Subscribe❤❤ jai Mahakal
❤️
🔥🔥🔥🔥
Day 150 ✅🔥
HOME WORK :)
class Solution
{
public:
//Function to return the level order traversal of a tree.
void cal(vector&ans,Node *root,queue&q){
if(root==NULL){
return ;
}
q.push(root);
while(!q.empty()){
Node *temp=q.front();
q.pop();
ans.push_back(temp->data);
if(temp->left!=NULL){
q.push(temp->left);
}
if(temp->right!=NULL){
q.push(temp->right);
}
}
}
vector levelOrder(Node* root)
{
vectorans;
queueq;
cal(ans,root,q);
return ans;
}
Good morning sir
I am new to this channel
sir If I purchase the course today at 99 rupees. How long will I get the doubt support for?
Will I get certificate if I pay 99 and follow from TH-cam or is there any condition to get certificate??
Pls clarify it as soon as possible sir
I mailed ur team but no response
Bhai mat lo ab....
@@CoderArmy9 y sir.
My college teachers are asking certificate from wherever I learn anything sir
Day 150/180 #180DaysOfCode
bhaya, ye jo Binarytree() ky nadar pir BinaryTree() call kia hai uska concept kistatarah clear hogayaga.
Bhai aap recursion series dekho pehle, sab samjh aajyga
bro eats 1000 course seller in breakfast
Lec - 102
❤❤❤
👍
Heap and hashmap ????
Bhai tree ke andar hi aata hai heaps, iske baad BST, Phir AVL Tree then Heap aayega, Don't worry sab cover hga ek sequence mein. Aur hashing bhi cover hga...