Bottom view of a Binary Tree Algorithm

  Рет қаралды 36,274

Vivekanand Khyade - Algorithm Every Day

Vivekanand Khyade - Algorithm Every Day

Күн бұрын

Пікірлер: 46
@debs1991
@debs1991 Жыл бұрын
The honesty you pour while explaining is priceless. Thanks : )
@vivek5562
@vivek5562 5 жыл бұрын
That smile when he said these are over each other..9:32
@adityaaggarwal4622
@adityaaggarwal4622 4 жыл бұрын
bhai 🤣🤣🤣🤣🤣
@mkmayankchaudhary90
@mkmayankchaudhary90 5 жыл бұрын
Sir....u r officially awesome..... means the ease with which u explain the stuff is superb !! Thanks again
@wshgziva9952
@wshgziva9952 2 жыл бұрын
Wonderful explanation, can understand very clearly, thanks a lot!!
@arjungurjar4600
@arjungurjar4600 7 жыл бұрын
Great Job , Thanks for uploading.
@surbhisharma8052
@surbhisharma8052 4 жыл бұрын
Awesome explanation sir , keep uploading
@manikumar5198
@manikumar5198 7 жыл бұрын
sir can you explain algorithm for solving rat in a maze problem
@bmrreddy2002
@bmrreddy2002 6 жыл бұрын
Is it more efficient to do this versus using a List? using a regular level order traversal - Top View : Use a queue in the HashTable, and foreach keyvaluepair ordered by key, u just have to peek the queue. Bottom View : Use a stack in the HashTable and foreach keyvaluepair ordered by key, u just have to peek the stack.
@tejaswgaur8813
@tejaswgaur8813 3 жыл бұрын
same thoughts
@rachitdiwan7312
@rachitdiwan7312 4 жыл бұрын
Great work man, keep going.
@TheJazzzzzzzzzz
@TheJazzzzzzzzzz 4 жыл бұрын
very good explanation .. impressed
@param_083
@param_083 7 жыл бұрын
Nice explanation .Sir please upload a video on "cloning a binary tree" . thank you
@vivekanandkhyade
@vivekanandkhyade 7 жыл бұрын
yes sure parmanand..!
@gourharisharma9373
@gourharisharma9373 4 жыл бұрын
This implementation has a small bug that it is not vertical order traversal, its horizontal level traversal.
@sarikaranjitkumar174
@sarikaranjitkumar174 4 жыл бұрын
Thanks for the explanation!
@ayushpant6190
@ayushpant6190 5 жыл бұрын
If 'G' node didn't have its left and right nodes and 'D' node didn't have its left and right nodes then our ideal answer should be d, b, e, f, c, g. But according to our algorithm d, b, f, c, g as our 'e' and 'f' nodes hd value is equal to 0. Can some one explain?
@gourharisharma9373
@gourharisharma9373 4 жыл бұрын
his implementation has a small bug that it is not vertical order traversal, its horizontal level traversal.
@ankitvishnoi8670
@ankitvishnoi8670 5 жыл бұрын
It would be very helpful if you show us the working code in any programming language at the end.
@karun4663
@karun4663 5 жыл бұрын
check out geeks for geeeks for code
@BtrmaAbhishekVerma
@BtrmaAbhishekVerma 4 жыл бұрын
Thanks. Very helpful
@premgupta9130
@premgupta9130 5 жыл бұрын
sir you are fantastic
@mayankgupta2543
@mayankgupta2543 4 жыл бұрын
Why do ppl ask for code. Will the mug up?? If yes how useful it is.
@goyaldeepak702
@goyaldeepak702 6 жыл бұрын
Thanks its very helpful
@anandprakash3536
@anandprakash3536 7 жыл бұрын
sir u r immensely requested to put the videos of hashing using code in c. It shud contain some examples.
@clashofclanss463
@clashofclanss463 7 жыл бұрын
Thank u very much sirrr!!!!
@tapanjeetroy8266
@tapanjeetroy8266 5 жыл бұрын
Thanks a lot sir
@vidyasagar8447
@vidyasagar8447 7 жыл бұрын
Hi sir, I think doing inorder traversal while printing the nodes which has left and right children as null will also work. if it works then it will be better way right?
@balakrishnanramachandran8828
@balakrishnanramachandran8828 7 жыл бұрын
good idea
@ajeyajois9186
@ajeyajois9186 6 жыл бұрын
it wont work all the times wen ur tree has only 3 nodes root,left and right then ur bottom view contains all 3 nodes but ur logic prints only left and right child hence it fails
@vishaldeshpande6514
@vishaldeshpande6514 6 жыл бұрын
sir ,please upload the code in the discription .thank you
@balakrishnanramachandran8828
@balakrishnanramachandran8828 7 жыл бұрын
u r gr8
@parthsoni7370
@parthsoni7370 3 жыл бұрын
Nicee!
@tsupreetsingh
@tsupreetsingh 4 жыл бұрын
Thanks bruh
@AddieInGermany
@AddieInGermany 7 жыл бұрын
Sir provide the git link for the code if you'have.
@kushagradeep1963
@kushagradeep1963 5 жыл бұрын
thnx man
@Subs1208
@Subs1208 7 жыл бұрын
Why d should be part of bottom view ?
@anamikadolly4684
@anamikadolly4684 5 жыл бұрын
Please upload the code.
@ZiiiP2142
@ZiiiP2142 7 жыл бұрын
Cool. ^^
@anty_07
@anty_07 5 жыл бұрын
The solution seems incorrect for below case - a / \ b c / \ / \ d e f g hd - a = 0 b = -1 c = 1 d = -2 e = 0 f =0 g = 2 By your algo, dbfcg should print, which in correct.
@Ankit13555
@Ankit13555 7 жыл бұрын
but sir if we also have to print nodes at same horizontal distance ...then do we need to keep track of vertical distance too?? If yes how?????
@vivekanandkhyade
@vivekanandkhyade 7 жыл бұрын
we only need horizontal distance......Thanks Ankit.......i will discuss more on this problem if you want.
@Ankit13555
@Ankit13555 7 жыл бұрын
Yes sir
@hardikagarwal7652
@hardikagarwal7652 3 жыл бұрын
bhut ghatiya explanation
Diagonal Sum in Binary Tree (Algorithm)
23:15
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 12 М.
Vertical Order Traversal of a Binary tree (Algorithm)
18:35
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 71 М.
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 6 МЛН
L24. Right/Left View of Binary Tree | C++ | Java
13:28
take U forward
Рет қаралды 228 М.
Spiral (zig-zag) level order traversal of a binary tree
14:12
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 34 М.
L23. Bottom View of Binary Tree | C++ | Java
13:13
take U forward
Рет қаралды 195 М.
Level Order Traversal of a Binary Tree (level by level and as a whole)
13:54
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 51 М.
LOWEST COMMON ANCESTOR OF A BINARY TREE III [PYTHON]
16:38
Cracking FAANG
Рет қаралды 12 М.
Binary Tree Right Side View
8:28
Kevin Naughton Jr.
Рет қаралды 41 М.
Threaded Binary Tree (TBT) IN Data Structure Explaination
19:17
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 204 М.
Height of a Binary Tree / Maximum depth of a binary tree Algorithm [REVISITED]
16:50
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 119 М.
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 6 МЛН