Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following strings are inserted, one at a time and in the order given, into a

ID: 3737213 • Letter: T

Question

The following strings are inserted, one at a time and in the order given, into an initially empty heap:

"Fred", "Terri", "Bob", "Wilma", "Zelda", "Pam", "Ron"

The resulting heap array would be:

a. Zelda Ron Wilma Fred Terri Bob Pam

Zelda Ron Wilma Bob Pam Fred Terri

Zelda Wilma Ron Fred Terri Pam Bob

Yellow White Red Green Violet Blue Orange

none of the above

a. Zelda Ron Wilma Fred Terri Bob Pam

b.

Zelda Ron Wilma Bob Pam Fred Terri

c.

Zelda Wilma Ron Fred Terri Pam Bob

d.

Yellow White Red Green Violet Blue Orange

e.

none of the above

Explanation / Answer

Answer)

According to the alphabetical series we take the first number of the equivalent word letter. Thus, the words have a single digit number to represent them as:

"Fred" 2

"Terri" 5

"Bob" 1

"Wilma" 6

"Zelda" 7

"Pam" 3

"Ron" 4

This means that "Fred", "Terri", "Bob", "Wilma", "Zelda", "Pam", "Ron", has been inserted into a initially empty heap.

We have created a max heap and thus, the output in array after inserting in the heap is:

7,6,4,2,5,3,1

Zelda, Wilma, Ron, Fred, Terri, Pam, Bob

The above output matches with the option:

c. Zelda Wilma Ron Fred Terri Pam Bob

and thus this will be the answer.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote