Beautiful algorithm! I would not have thought of code this elegant. I'm just curious, did you think of this algorithm by yourself? Or is this a previously-known algorithm (that you have presented so clearly)?
Hey, Sir, I am following you for the past 1 year and your videos are very easy to understand and it gives me a lot of confidence to work on. I would ask for your help to create a placement series where we would get the 100 best questions discussion covering the entire topic of DS Algo and if that works on. We will be surely hitting big companies on campus for sure. ThankYou Prashant Giri Jadavpur University
Why do we need to explicitly specify a condition - If (p == null) break; The outer loop will anyway end as queue becomes empty at the last. Here is the implementation in Python - github.com/suyash248/ds_algo/blob/master/Tree/printDiagonals.py
By this method u can solve in O(N) and not itn O(n^2) public static void Diagonal(Node root, Map h){ LinkedList q= new LinkedList(); q.add(root); while(!q.isEmpty()){
Great explanation. Please avoid saying bad about other websites, it doesn't give out a good impression. People will give you the credit for the amazing videos anyway. Thanks from your well wisher
sir ..u r d only one i found till now who covered these topics of binary tree...thanks alottt...
You are an excellent teacher keep up the good work god bless you
This video is great! Nice explanation and clear algorithm! Thank you!
BEST SOURCE TO LEARN ALGOS
Brother thanks for such a clear explanation.., kudos to you
Thanks you so much sir for the best explanation ever for diagonal elements. Haven't found better explanation than this.
Bhai.. good approach..Till now i was doing it recursively and finding ways to do it iteratively.. great Man..
Thanks a lot for simple explanation and visiting each every node to show logic.Thanks again.
Nice explanation Sir
BEST EXPLAINATION, THANK YOU, SIR
love you sir!!! kya smjhate ho tussi!!....
very nice explanation..literally
You explain so well!!!!! Superb!! Thank you :)
the way u teach is also very gud....
Thanks Mili...!
Excellent !
Very clear and easily understandable..!!!
nice explanation.. thanku sir
Awesome yaar, keep doing!
Great explanation mahn ..... Keep it up
At 22:34 don't you think the traversal should be "dij" instead of "dji"
btw nice tutorial sir
yes it is !!
great helped in a lot of interviews sir
thank you
Great explanation..!!
Sir you're THE best
Beautiful algorithm! I would not have thought of code this elegant. I'm just curious, did you think of this algorithm by yourself? Or is this a previously-known algorithm (that you have presented so clearly)?
sir I think more easy way is to use map concept as you have used in vertical order traversal.
Hey, Sir, I am following you for the past 1 year and your videos are very easy to understand and it gives me a lot of confidence to work on.
I would ask for your help to create a placement series where we would get the 100 best questions discussion covering the entire topic of DS Algo and if that works on. We will be surely hitting big companies on campus for sure.
ThankYou
Prashant Giri
Jadavpur University
beautiful
Mind blowing algorithm
kudos!! You made it look simple :)
nice explanation
nice explanations
Yours video simply super. Can you please help me how to traversal a full binary tree in circular spiral (not in zigzag way).
thanks bruh
Good One sir!
sir please upload more problems of binary tree
Great. Thanks!
sir thanks a lot ......
what is the time complexity of the solution?
thank you sir
Thanks Srinidhi..!
Why do we need to explicitly specify a condition -
If (p == null) break;
The outer loop will anyway end as queue becomes empty at the last. Here is the implementation in Python -
github.com/suyash248/ds_algo/blob/master/Tree/printDiagonals.py
thanks god :-P
sir , plz tim sorting pe details video bana ke samjyo do
讲的很好就是口音真的没字幕听不懂。
如果没有翻译,您的评论会更加不全面。顺便问一下,你好吗?
sir could you upload on find the node in a binary tree having duplicate subtrees
yes sure Veerraju.
Hey VeerrRaju.....did u check the diagonal elements of a binary tree video.....u had asked for it....i m very happy to help u with that video.
sir i checked it
@@vivekanandkhyade sir diagonal traversal is not uploaded on your github account
its - d,i,j not d,j,i
By this method u can solve in O(N) and not itn O(n^2)
public static void Diagonal(Node root, Map h){
LinkedList q= new LinkedList();
q.add(root);
while(!q.isEmpty()){
// for(int i=0;i
Great explanation. Please avoid saying bad about other websites, it doesn't give out a good impression. People will give you the credit for the amazing videos anyway. Thanks from your well wisher
where is its program
Sir....I could be able to find this whole program on ur github account
void diagonalDistanc(Node * root, int d, map &v ){
if(!root) return;
v[d].push_back(root->data);
diagonalDistanc(root->left, d+1, v);
diagonalDistanc(root->data,d,v);
}
Rest you can print it.
With each algorithm you discuss, will you also please provide examples of best and worst time complexity for the same
Very difficult
13:02 You missed out on marking u as 2.
u will be 3 not 2