Problem 2 Assume that you are implementing a heap using a fixed size array. 1- Illustrate how the following heap would be constructed (show the content of the array, show in detail only what happens when nodes DOB and 17 are added): The nodes are inserted in the following order (key, value): (9, -4), (3, -6), (11, -4), (13, -7), (DOB, -2), (12, -8), (3xMOB, -5), (17, -7), (6, -3). 2- Illustrate what happens to the heap when invoking remove (show the details). 3- Assume that you have an array of integers, write a code that would allow you to sort the array in ascending order (smallest to largest), using only a heap.

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter10: Data Analysis With Power Tools And Creating Macros
Section: Chapter Questions
Problem 2EYW
icon
Related questions
Question

Java programming

Computer science

My birthday is July 15th. 

Please please help me

NOTE: In all what follows, DOB refers to your day of birth and MOB would be the month
of your birth. If you are born on 9/28/1990. DOB = 28 and MOB = 9
Transcribed Image Text:NOTE: In all what follows, DOB refers to your day of birth and MOB would be the month of your birth. If you are born on 9/28/1990. DOB = 28 and MOB = 9
Problem 2
Assume that you are implementing a heap using a fixed size array.
1- Illustrate how the following heap would be constructed (show the content of the array,
show in detail only what happens when nodes DOB and 17 are added): The nodes are
inserted in the following order (key, value): (9, -4), (3, -6), (11, -4), (13, -7), (DOB, -2),
(12, -8), (3xMOB, -5), (17, -7), (6, -3).
2- Illustrate what happens to the heap when invoking remove (show the details).
3- Assume that you have an array of integers, write a code that would allow you to sort the
array in ascending order (smallest to largest), using only a heap.
Transcribed Image Text:Problem 2 Assume that you are implementing a heap using a fixed size array. 1- Illustrate how the following heap would be constructed (show the content of the array, show in detail only what happens when nodes DOB and 17 are added): The nodes are inserted in the following order (key, value): (9, -4), (3, -6), (11, -4), (13, -7), (DOB, -2), (12, -8), (3xMOB, -5), (17, -7), (6, -3). 2- Illustrate what happens to the heap when invoking remove (show the details). 3- Assume that you have an array of integers, write a code that would allow you to sort the array in ascending order (smallest to largest), using only a heap.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Stack
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr