The way he says Hello friends itself takes my anxiety away.. Thank you for your efforts.
@surajjha55426 жыл бұрын
Nice video , just a minor correction : print root node first and then pass root's left to the print_left function . Otherwise it will fail for a tree having only right nodes.
@aakashparmar5603 жыл бұрын
Sir just want to say thank you for this wonderful video. You are OP sir...........
@meghasharma30924 жыл бұрын
Just can't tell , how good you are ! Your videos have been really helpful for me in preparing for data structures interviews..! :)
@minirasamedova6483 жыл бұрын
You are genius!! Thank you so much for a simple explanation
@JJ-Bond5 жыл бұрын
this is a very great explanation, I appreciate all of your videos. a small thing 1. root needs to be dealt with independently before process left and right subtree
@kasyapdharanikota85703 жыл бұрын
very well explained sir, thank you for detailed explanation
@AlancRodriguez3 жыл бұрын
Superb explanation!
@sandeepsinghnegi36446 жыл бұрын
can you make a series on solving the competitive programming question
@anindyasundarhazra25233 жыл бұрын
Plz sir
@chrisy.7032 жыл бұрын
really really good man!
@arpitgupta11435 жыл бұрын
Your explanation is nice... but if the tree is skewed it will print the boundary elements multiple times.
@sandhyagupta73594 жыл бұрын
true
@Algo_Guru4 жыл бұрын
Hi Vivekanand, very clear explanation..Thanks. One request, could you please also mention some use cases (applications) of each of the traversals? This would motivate the viewers.
@ibrahimshaikh36425 жыл бұрын
Nice video,also please mention Time complexity for algorithm
@karthikrashinkar2043 жыл бұрын
Can I say that we need to find 1) left view of binary tree 2) right view of binary tree 3) find leaf nood of binary tree ?
@RahulKashyap-yv5ox3 жыл бұрын
no
@_ADITIKAJALE3 жыл бұрын
@@RahulKashyap-yv5ox why?
@edwardteach23 жыл бұрын
Thanks, my python implementation: # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def __init__(self): self.root = [] self.lb = [] self.rb = [] self.leaves = [] def boundaryOfBinaryTree(self, root): """ :type root: TreeNode :rtype: List[int] """ if not root: return root self.root.append(root.val) self.left_bdr(root.left) self.leaf(root.left) self.leaf(root.right) self.right_bdr(root.right) return self.root + self.lb + self.leaves + self.rb[::-1] def left_bdr(self, root): if root: if root.left: self.lb.append(root.val) self.left_bdr(root.left) elif root.right: self.lb.append(root.val) self.left_bdr(root.right) def right_bdr(self, root): if root: if root.right: self.rb.append(root.val) self.right_bdr(root.right) elif root.left: self.rb.append(root.val) self.right_bdr(root.left) def leaf(self, root): if root: self.leaf(root.left) self.leaf(root.right) if not root.left and not root.right: self.leaves.append(root.val)
@user-mo1vm2nt7l5 жыл бұрын
You are really awesome dude
@amitranjan69982 жыл бұрын
in the left tree recursion ,if e finishes the recursion stack then after some time it go back to C and from C it look ,it's have right subtree or not ,it have so it add C again
@roshanraut30934 жыл бұрын
Requires to change the position of print in print_right function.
@harshanand40183 жыл бұрын
In Right Boundary Condition,there is a correction. First we need to traverse to right child and then print the data.
@feisuxiaozhu5 жыл бұрын
very clear, thanks a lot!
@jeeveshkataria64394 жыл бұрын
wrong, Not work for skew trees
@aayush54744 жыл бұрын
you need an extra condition to check if the tree is skewed otherwise the code will fail
@mahipalsingh-yo4jt4 жыл бұрын
return "very well explained" ;
@Sarojkumar-yh9uy6 жыл бұрын
awsome sir
@Sarojkumar-yh9uy6 жыл бұрын
sorry sir , not working for right skew tree
@PradeepSingh-ov3bt6 жыл бұрын
the error lies using 2 "if" instead of 1 if and 1 else if
@DeepakGupta-zz1vf3 жыл бұрын
Sir there are many videos which are not added in playlist, Can you please add it
@vikasbajpai30136 жыл бұрын
wrong code
@user-mo1vm2nt7l5 жыл бұрын
Sir your code is wrong it does not work for input (15,10,8,12,13,20,17,25)
@ganeshiitr-cse63285 жыл бұрын
Thanks ....
@vash7216 жыл бұрын
Sir can you plz explain the M-way search tree ........
@285ravi6 жыл бұрын
its not printing in correct order, to get correct order,in right view all the printing statements should be just below of recursive calling function.
@aashutoshvatsa51525 жыл бұрын
can u please provide quick sorting and merge sorting .
@railgang50265 жыл бұрын
Plz solve postorder traversal from Given in order,preorder
@deepakgoyal5896 жыл бұрын
Sir can u explain rope data structure please
@user-zj9pq5xc7x4 ай бұрын
you could have easily gone anticlockwise...this doesn't make much sense, sorry