Hint for 2 BST | Two steps | Easy Solution | Day 5

Step 1: Perform InOrder travesal on both trees and store them in two lists, we choose InOrder because an InOrder traversal of a BST is always sorted.

Step 2: Merge the lists obtained in Step 1 using the technique used in Merge sort to merge two arrays, and return the merged list.

Comments (0)