Teaching Kids Programming – All Elements in Two Binary Search Trees (Parallel Iterative Inorder Traversal Algorithm)

Teaching Kids ProgrammingVideos on Data Structures and Algorithms Given two binary search trees root1 and root2, return a list containing all the integers from both trees sorted in ascending order. Example 1:Input: root1 = [2,1,4]root2 = [1,0,3]Output: [0,1,1,2,3,4] Example 2:Input: root1 = [1,null,8]root2 = [8,1]Output: [1,1,8,8] Constraints:The number of nodes in each tree is in … Read more

Teaching Kids Programming – Left/Right Side View of a Binary Tree using Depth/Breadth First Search Algorithms

Teaching Kids Programming: Videos on Data Structures and Algorithms Given the root of a binary tree, imagine yourself standing on the left/right side of it, return the values ​​of the nodes you can see ordered from top to bottom. Given the following Binary Tree, the left side view will be [6, 3, 6] while the … Read more