Question
B trees java

NAME CSC 236 HW #3 (B-trees & heaps) 1. Given a B-tree of order 5, add the elements 1, 12, 8, 2, 25, 5, 14, 28, 17, 7, 52, 16
2. Add the elements 27, 35, 23, 22, 4, 45, 21, 5, 42, 19 into a heap in this order Draw the diagrams to show the heap after e
NAME CSC 236 HW #3 (B-trees & heaps) 1. Given a B-tree of order 5, add the elements 1, 12, 8, 2, 25, 5, 14, 28, 17, 7, 52, 16, 48, 68, 3, 26, 29, 53, 55, 45 into a B-tree in this order. Draw the diagrams to show the B-tree after each element is added.
2. Add the elements 27, 35, 23, 22, 4, 45, 21, 5, 42, 19 into a heap in this order Draw the diagrams to show the heap after each element is added. ER WH Finally, show the resulting heap after removing the root stnamals ant bbo.Cbtots 295 0s E 8a BtSse r 8s e es sa st.t ds tto t-8art worts of amonpb art wod oo int at babbo 3. In the implementation of a priority queue, why might using a binary search tree work poorly? (answer in a few sentences)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 1
***********

0001 0012

0001 0008 0012

0001 0002 0008 0012

0008 0001 0002 0012 0025

0008 0001 0002 0005 0012 0025

0008 0002 0001 0005 0012 0014 0025

0008 0002 0001 0005 0012 0014 0025 00280008 0017 0002 0001 0005 0012 0014 0025 00280017J 0008 0001 0002 0005 0007 0012 0014 0025 00280017J 0008 0001 0002 0005 0007 0012 0014 0025 0028 00520017J 0008 0002 0001 0005 0007 0012 0014 0016 0025 0028 00520017J 0008 0001 0002 0005 0007 0012 0014 0016 0025 0028 0048 00520048 0008 0017 0001 0025 0068 0002 0005 0007 0012 0014 0016 0028 00520003 0008 0017 0048- 0001 0002 0005 0007 0012 0014 0016 0025 0028 0052 00880048 0003 0008 0017 0001 0002 0005 0007 0012 0014 0016 0025 0026 0028 0052 0080003 0008 0017 0048- 0012 0026 0001 0002 0005 0007 0014 0016 0025 0028 0029 0052 00880003 0008 0017 0048 - 0001 0002 0005 0007 0012 0014 0016 0025 0026 0028 0029 0052 0053 00680003 0008 0017 0048 001 0002 0005 0007 0012 0014 0016 0025 0026 0028 0029 0052 0053 0055 00680017 0028 0003 0008 0048 001 0029 0005 0025 0002 0007 0012 0014 0016 0026 0045 0052 0053 0055 0088

Answer 2
*************

00270027 00350027 00350022 0023 0027 00350004 0022 0027 0023 00350004 0022 0027 0023 0045 00350004 0022 0021 0023 0045 0035 00270004 0005 0021 0023 0045 0022 0027 00350004 0005 0021 0023 0045 0022 0027 0035 00420004 0005 0021 0010 0045 0022 0027 0035 0042 0023if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
B trees java NAME CSC 236 HW #3 (B-trees & heaps) 1. Given a B-tree of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Trees and Heaps 1. Show that the maximum number of nodes in a binary tree of...

    Trees and Heaps 1. Show that the maximum number of nodes in a binary tree of height h is 2h+1 − 1. 2. A full node is a node with two children. Prove that the number of full nodes plus one is equal to the number of leaves in a nonempty binary tree. 3. What is the minimum number of nodes in an AVL tree of height 15? 4. Show the result of inserting 14, 12, 18, 20, 27, 16,...

  • please do this lab in Java in given instructions by tomorrow morning. TkA CHRI - TREE...

    please do this lab in Java in given instructions by tomorrow morning. TkA CHRI - TREE UTH A HEAPOF PRESDNS CENETH CSC 236-Lab 6 (2 programs) trees 1. Given the two binary trees below: 14 18 16) Write a method called swapSubtrees, which swaps all of the left and right subtrees in the above binary trees. Add this method to the class BinaryTree and create a program to test this method for these 2 trees. Show the original trees and...

  • Using Java Qaustion 1) A) Draw a B-tree of order 5, which is received sequentially introduction...

    Using Java Qaustion 1) A) Draw a B-tree of order 5, which is received sequentially introduction of the following elements: 200,300,8,17,100,2,20,30,89,26,14,15 ,10 B) Show the result of deleting elements 15, 14, 10, 8 from the constructed trees.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT