1. Morris traversal || Inorder traversal in O(1) space || Binary tree
Описание
In this video, I have discussed about morris traversal, which is finding the inorder traversal of binary tree in O(1) space.
The algorithm used is:
1) If the left subtree of node is NULL, we process the current node and move to right subtree
2) else, we make the node as the right child of maximum element in leftmost subtree.
Practice questions:
1) Geeks for Geeks: https://practice.geeksforgeeks.org/problems/inorder-traversal/1
Article: https://www.geeksforgeeks.org/inorder-tree-traversal-without-recursion-and-without-stack/
Playlist on binary search tree (bst) data structure:https://www.youtube.com/watch?v=8JoXbQSSV_w&list=PLNxqWc8Uj2LQpbGv6I_HWf0kTj6kMVVwm
Playlist on binary tree data structure: https://www.youtube.com/watch?v=kgAAfIB_358&list=PLNxqWc8Uj2LRbsOlBiPJZAyZpaUwdDepd
SDE Placement Strategy: https://youtu.be/CAUhA2TmfrI
Linkedin: https://www.linkedin.com/in/kashish-mehndiratta/
Instagram: https://www.instagram.com/kashish__mehndiratta1/
I hope you liked my video, do subscribe to my channel to get the updates of my latest uploads.
#bst #binarysearchtree #binarytree #datastrucuture #algorithm #interviewquestions #placement #internship #faang
Рекомендуемые видео



















