Sample input: Sample output: 3 1 2 3 1 2 1 2 3 3 2 1 1 4 3 2 4 2 3 1 1 5 2 1 3 5 3 2 1 1 2 1 4 3 5 5 3 4 2 1 6 4 4 5 4 6 5 4 4 4

Fundamentals of Information Systems
8th Edition
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter6: Information And Decision Support Systems
Section: Chapter Questions
Problem 3LO
icon
Related questions
Question

Code in Python language please.

We have inputs of white-spaced separated integers. We need output of a max heap. Sample are shown below.

 

Sample input:
Sample output:
3 1 2
1 2 3
1 4 3 2
1 5 2 1 3
2 1 4 3 5
3 1 2
3 2 1
4 2 3 1
5 3 2 1 1
5 3 4 2 1
6 4 4 5 4
6 5 4 4 4
Transcribed Image Text:Sample input: Sample output: 3 1 2 1 2 3 1 4 3 2 1 5 2 1 3 2 1 4 3 5 3 1 2 3 2 1 4 2 3 1 5 3 2 1 1 5 3 4 2 1 6 4 4 5 4 6 5 4 4 4
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
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.
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning