0
Median of two AVL trees
Hello fellow coders! I have been given this task and have been trying to figure out a solution but can’t seem to wrap my head around it. If we have two AVL trees and we would want to find the median of all of the integers in the trees how can we do it in O(log n) time where n is the total number of values. Ps. Each node can store the number of nodes of its subtree Any help would be appreciated Thanks a lot 🥰
1 Odpowiedź
0
Pintu Kumar we need to find the median of the two trees not just one