Problem 1305 · Medium

All Elements in Two Binary Search Trees

Read each binary search tree in order to get two sorted lists, then merge them with two pointers.

Open the interactive visualisation