For a set of {1, 5, 6, 4, 16, 17, 10}of keys, draw binary trees of heights 2, 3, 4, 5, and 6.
For a set of {1, 5, 6, 4, 16, 17, 10}of keys, draw binary trees of...
6. Create a max heap by adding values in this order: 15, 30, 17, 10, 16. 7. Draw the binary expression trees for the following infix expressions: a. (x+12)'y+12 b. (5-3) 4+9-7
Please help! Student # keys Student # keys Student # keys 1 0 9 5 17 3 2 2 10 1 18 3 3 4 11 5 19 2 4 2 12 3 20 7 5 3 13 2 21 3 6 2 14 4 22 2 7 0 15 0 8 3 16 1 Make a dot plot of the distribution of the number of keys carried. Does the sample distribution reveal any marked departures from normality? Explain. Compute...
Tree & Hash Table & Heap Use the following integer keys 73, 58, 91, 42, 60, 130, 64, 87 to perform the followings: a) Binary Search Tree - Draw a binary search tree - Retrieve the integers keys in post-order - Retrieve the integers keys in pre-order - Draw a binary search tree after node 58 is deleted b) Create a Hash Table using the methods described below. Show the final array after all integer keys are inserted. Assumes that...
please I need it urgent thanks algorithms
2 Binary Search Trees- 10 points (5 points each) 1. Write pseudocode for an algorithm that takes in the root of a binary tree and returns whether or not the tree is a legal binary search tree. 2. Write pseudocode for an algorithm that takes in the root of a binary search tree and prints the keys in sorted order.
1. Draw the 2-3 trees that result when you insert the keys Y L P M X H C R A E S İn that order into an initially empty tree. There should be 11 trees in all. Use the final tree to construct the corresponding red-black tree. 2. Draw all the structurally different red-black trees (i.e. no specific keys) with n keys for n from 2 to 8.
Binary Search Trees
(a) 5 pointsl Insert 5, 12, 7, 1, 6, 3, 13, 2, 10, 11 into an empty binary search tree in the given order. Show the resulting BST after every insertion. (b) 5 points) What are the preorder, inorder, and postorder traversals of the BST you have after (a)? (c) 5 points Delete 2, 7, 5, 6, 11 from the BST you have after (a) in the given order Show the resulting BST after every deletion.
PROBLEM 6: Suppose we insert keys below into an initially empty Vanilla binary search tree in the given order: 6, 9, 2, 1, 5, 7, 10, 8, 3, 4 (a) Draw the resulting binary search tree. (b) List the keys according to: A pre-order traversal An in-order traversal A post-order traversal (c) Now we perform some deletions using the “deletion by copying” strategy in which promoted keys are always drawn from a node’s right subtree (so that there is only...
4. i) Give the difference between binary trees and Binary search trees. Insert the values 50, 76, 21, 4, 32, 64, 15, 52, 14, 100, 2, 3, 70, 87, 80 in the BST [Show the steps]. Write the algorithm for all the 3 operations of BST ii) Insert the given items 16, 14, 10, 8, 7, 9, 3, 2, 4, l into the Min- Heap. [Show the steps]. Write the pseudocode for Insertion of items using the Min- Heap
#1 Create two AVL trees with 7 keys: A, B, C, D, E, F, and G. (There are 5,040 different key sequences that produce 429 unique trees. Of those trees, 17 are AVL trees.) a. Draw the shortest AVL tree containing these 7 keys. b. Draw one of the tallest possible AVL trees containing these 7 keys.
PROBLEM 6: Suppose we insert keys below into an initially empty binary search tree in the given order 6, 9, 2, 1, 5, 7, 10, 8, 3,4 (a) Draw the resulting binary search tree. (b) List the keys according to: A pre-order traversal An in-order traversal A post-order traversal (c) Now we perform some deletions using the "deletion by copying" strategy in which promoted keys are always drawn from a node's right subtree (so that there is only one correct...