Question

Data Structures and Algorithms (Java Programming) Given the following list of inputs: 47, 83, 56, 30,...

Data Structures and Algorithms (Java Programming)

Given the following list of inputs: 47, 83, 56, 30, 12, 67, 35, 25, 80, 61

a) Trace the development of the heap in abstract form that would evolve by inserting the inputs in the order that they are presented.

b) Draw the final version of the array representation of this heap, i.e. you need not show the array develop.

c) What property of a heap led to the array being smaller than that of the binary search tree in problem 9b.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

Max Heap 3 Raheop 3 56 30 3, 12 235 ( g0 83 Redel

b)

231 90/67/97?/{/ 23 YTc) HEAP is a complete binary tree. This property led to the array being smaller in heap than that of the binary search tree .

Add a comment
Know the answer?
Add Answer to:
Data Structures and Algorithms (Java Programming) Given the following list of inputs: 47, 83, 56, 30,...
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
  • c++, data structures Given the following Binary Tree: tree 56 47 69 22 49 59 11...

    c++, data structures Given the following Binary Tree: tree 56 47 69 22 49 59 11 29 62 I 23 30 61 64 1. Show the order in which the nodes in the tree are processed by inorder traversal, postorder traversal, and preorder traversal. 2. Show how the tree would look like after deletion of 29, 59 and 47 3. Show how the original tree would look after the insertion of nodes containing 63, 77,76, 48, 9, and 10 (in...

  • Using C++, data structures, C++ STL, inputs and expected outputs are shown below. Max Heap Heap...

    Using C++, data structures, C++ STL, inputs and expected outputs are shown below. Max Heap Heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either > (in a max heap) or s (in a min heap) the key of C. The node at the "top" of the heap (with no parents) is called the root node. In binary-tree based heap, it...

  • Copy the following java codes and compile //// HighArray.java //// HighArrayApp.java Study carefully the design and...

    Copy the following java codes and compile //// HighArray.java //// HighArrayApp.java Study carefully the design and implementation HighArray class and note the attributes and its methods.    Create findAll method which uses linear search algorithm to return all number of occurrences of specified element. /** * find an element from array and returns all number of occurrences of the specified element, returns 0 if the element does not exit. * * @param foundElement   Element to be found */ int findAll(int...

  • Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In...

    Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In this project, we combine the concepts of Recursion and Merge Sorting. Please note that the focus of this project is on Merging and don't forget the following constraint: Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3)...

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