English, asked by shiva5675, 5 hours ago

Question 1.
In sorting 6.5,3.1.8,7,24 by heap sort a max heap is created by adding the elements one by one, then the first elements to be swapped are
Answer:
O 5,8
0 6,5

O 17
O 5,3​

Answers

Answered by damakkhrera123
6

Answer:

8,7,24 by heap sort a max heap is created by adding the elements one by one, then the first elements to be swapped are. Answer: O 5,8

Explanation:

plz flow me my dear friend

Answered by Hansika4871
0

The first elements to be swapped are 6, 5. (option b)

  • Heap sort is a sorting algorithm that uses the Binary Heap data structure to compare items. We add elements one by one in heap sort.
  • As a result, 6 is the first element to be added, followed by 5.
  • Although 6 is greater than 5, it gets entered before 5 in the heap. However, the order of the numbers should be reversed.
  • As a result, the first switch will take place between 6 and 5.

#SPJ3

Similar questions