Mond
699 posts
|
I can’t figure out how to do this, need some help please. I need to load a BTree ( using the Insertion Rules: > go right, <= go left ) from a Array containing the first 100 integers and the tree must remain balanced. I need to do this so I can run Time Trials against the Array & the Linked List. Thanks for any ideas!
|
Mond
699 posts
|
Nevermind, I got it.
var bTreeData:Array = new Array( 25, 75, 13, 37, 63, 87, 7, 19, 31, 43,
57, 69, 81, 93, 4, 10, 16, 22, 28, 34,
40, 46, 54, 60, 66, 72, 78, 84, 90, 96,
2, 6, 8, 11, 15, 17, 21, 23, 27, 29,
33, 35, 39, 41, 45, 48, 52, 55, 59, 61,
65, 67, 71, 73, 77, 79, 83, 85, 89, 91,
95, 98, 1, 3, 5, 9, 12, 14, 18, 20,
24, 26, 30, 32, 36, 38, 42, 44, 47, 49,
51, 53, 56, 58, 62, 64, 68, 70, 74, 76,
80, 82, 86, 88, 92, 94, 97, 99, 100);
|