ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
good
how is this different from invert tree question and mirror tree ?
Here I get error in my code!! 🥺It's about include related and file related error
void mirror(Node* node) { // code here if(node== NULL) return ; mirror(node->left); mirror(node->right); //exchange(node->left,node->right); Node* temp=node->left; node-> left=node-> right; node-> right=temp; }
make sure you have selected CPP
@@muskanchoudhary9792 yeah
It is a post-order traversal, right?
But swapping is expensive operation can we avoid and think other approach????
Node* Mirror(Node*root){ Node*p,*q; if(root!=NULL){ p=Mirror(root->lchild); q=Mirror(root->rchild); root->rchild=p; root->lchild=q; return root; }return NULL; }use this fun you will get best time complexity
Yogesh bhaiya se video banaya karo yrr , apko toh java aati nhi
array playist not completed
We are trying to solve imp questions first and after that we will be solving rest of the questions.
allah app ko salamat rakhe
bhai dsa basic krne ke baad phele is list ke question kre ya phele competitive programming
If you have done basics of DSA then start with sheet first, this will sharpen your dsa skills more
After solving some questions if you are comfortable with this type of questions then start CP parallaly with sheet
@@CodeLibrary ok brother
Bro insta link
Insta link-- instagram.com/i_am_yogesh_here/
good
how is this different from invert tree question and mirror tree ?
Here I get error in my code!! 🥺
It's about include related and file related error
void mirror(Node* node)
{
// code here
if(node== NULL)
return ;
mirror(node->left);
mirror(node->right);
//exchange(node->left,node->right);
Node* temp=node->left;
node-> left=node-> right;
node-> right=temp;
}
make sure you have selected CPP
@@muskanchoudhary9792 yeah
It is a post-order traversal, right?
But swapping is expensive operation can we avoid and think other approach????
Node* Mirror(Node*root){
Node*p,*q;
if(root!=NULL){
p=Mirror(root->lchild);
q=Mirror(root->rchild);
root->rchild=p;
root->lchild=q;
return root;
}
return NULL;
}
use this fun you will get best time complexity
Yogesh bhaiya se video banaya karo yrr , apko toh java aati nhi
array playist not completed
We are trying to solve imp questions first and after that we will be solving rest of the questions.
allah app ko salamat rakhe
bhai dsa basic krne ke baad phele is list ke question kre ya phele competitive programming
If you have done basics of DSA then start with sheet first, this will sharpen your dsa skills more
After solving some questions if you are comfortable with this type of questions then start CP parallaly with sheet
@@CodeLibrary ok brother
Bro insta link
Insta link-- instagram.com/i_am_yogesh_here/