Plz help

Jul 2, 2014 at 2:00pm
So if I have an array how do I convert it to a balance binary tree?
Last edited on Jul 2, 2014 at 2:17pm
Jul 2, 2014 at 2:09pm
closed account (10X9216C)
You can sort the array, and then take the middle value as the root node with the middle of the left and right subdivisions as its children. And repeat..
Topic archived. No new replies allowed.