Touching back with the main rules:
The array val[8] = {-1,4,2,1,3,6,5,7} is initialized.
The array bst[] is initialized to -1.
Writing two functions for a BST and preOrder traversal with...
Type: Posts; User: Iron_Shortage
Touching back with the main rules:
The array val[8] = {-1,4,2,1,3,6,5,7} is initialized.
The array bst[] is initialized to -1.
Writing two functions for a BST and preOrder traversal with...
It looks kind of weird because root == 1. One of the requirements is that the root parameter is always passing "1". So it is actually bst[(1-1)*2+1] == bst[1]. I haven't compiled anything yet, ...
I need some help brainstorming an algorithm for implementing a given array into a BST array.
This is what I am stuck with using:
My example array is "val[-1,4,2,1,3,6,5,7]" and I need to omit...