Write a function that converts a heap into a balanced binary search tree. The he
ID: 3540934 • Letter: W
Question
Write a function that converts a heap into a balanced binary search tree. The heap is in array of integers and the binary search tree is created by following structure typedef struct node { int key; struct node *left; struct node *right; } NODENODE *ConvertToBST(int hashtable[], int last) // Where the last is index of the last item Write a function that converts a heap into a balanced binary search tree. The heap is in array of integers and the binary search tree is created by following structure typedef struct node { int key; struct node *left; struct node *right; } NODE
NODE *ConvertToBST(int hashtable[], int last) // Where the last is index of the last item