Implement Functions Insertbst Findbst Permit Data Item Inserted Bst Found Bst Helper Funct Q37279469

Implement functions insertBST and findBST to permit a data itemto be inserted into a BST or to be found in a BST. What “helper”functions might be useful to have? One possibility is a createNodefunction that allocates a BST node with left and right pointersinitialized to NULL.

You’ll probably implement your functions assuming a specificdata type, e.g., floats, but try adapting to a different data type,e.g., pointers to Employee structs, so you’re sure you reallyunderstand how everything works. At that point it should be easy togeneralize your implementation to use a compare function like wedid with array-based binary search.

Just for the fun

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.