Sale!

CSS 352 Assignment 9 solution

Original price was: $35.00.Current price is: $30.00. $25.50

Download Details:

  • Name: Assignment-9-Binary-Search-Trees-ajy9pi.zip
  • Type: zip
  • Size: 5.32 KB

Category:

Description

5/5 - (4 votes)

1. Write a C program to perform the following operations in a BST:
– Insert a key value in a tree (iterative logic)
– Insert a key value in a tree (recursive logic)
– Delete a key value from the tree
– Search a key value and return its node address (if found)
– Traverse the tree
– Display the depth of the tree

2. Given the inorder and postorder traversal sequence, write a C program to construct the binary tree.

3. Given values ‘x’ & ‘y’ write a C code to find the Lowest Common Ancestor (LCA) node of two key values ‘x’ & ‘y’ in a BST.
[Hint: you may try to write a recursive algorithm; the trick is to find such a node which has one of the keys in the left subtree and the other in the right subtree while descending down from the root node]

4. Given a binary tree display it’s key sequence following breadth first search (bfs).
[Hint: use queue data structure]