Convert Sorted Array to Balanced 2-3-4 B tree
Given an array where elements are sorted in ascending order,and I need convert it to a 2-3-4 tree
I thought of a recursion which create every loop n开发者_如何转开发/3 nodes, choosing the maximum, and now I'm having hard time in understanding how to conitinue, It doesn't seem to work this way.
Thank you.
create an empty almost full tree, and then fill the tree with the array in an inorder search on the empty tree
精彩评论