DAT305_wk4_Binary_Search_Tree.docx Binary Search Tree Algorithm Visualization DAT 30
- From Economics, General Economics
- Termpaper
- Rating : 3
- Grade : B
- Questions : 0
- Solutions : 15269
- Blog : 0
- Earned : $2452.10
DAT305_wk4_Binary_Search_Tree.docx Binary Search Tree “ Algorithm Visualization DAT 305 Part 1 4.5.2 Upon adding the numbers (20, 12, 23, 11, 21, 30) into the binary search tree, the results were the same as it was on zyBooks. Questions: 1. As 18 is smaller than 20, it will go to 12, as 18 is greater than 12 it will be inserted to 12's right child. 2. As 11 is smaller than 20, it will got to 12, as 11 is smaller than 12 it will go to 11, as it is equal to 11 therefore go to 11's right child. 3. For a full 7 node BST 3 loop iteration will occur. As there are 3 levels. 4. For a full 255 node BST 8 loop iteration will occur. As there are 8 levels. floor(log2(255)) + 1, formula to find the number of levels of a full BST. 4.5.3 Questions: 1. As key is 7 and cur is 29, key is less than cur, therefore we should go to left , therefore the answer is cur = cur -> left. 2. As key is 18 and cur is 12, key is greater than cur, therefore we should go to right and we have to insert the node , therefore the answer is cur -> right = node. 3. As tree-> root = null, therefore we have to insert at root only so the answer is tree -> root = node 4. As key is 53 and cur is 76, key is less than cur, therefore we should go to left and we have to insert the node , therefore the answer is cur -> left = node. 5. As key is 600 and cur is 400, key is greater than cur, therefore we should go to right , therefore the answer is cur = cur -> right. 4.5.4 Questions:
[Solved] DAT305_wk4_Binary_Search_Tree.docx Binary Search Tree Algorithm Visualization DAT 30
- This solution is not purchased yet.
- Submitted On 18 Jun, 2022 04:45:21
- Termpaper
- Rating : 3
- Grade : B
- Questions : 0
- Solutions : 15269
- Blog : 0
- Earned : $2452.10