Question DSA-HEAP-0045
Medium12 is inserted into the min-heap [10, 20, 15, 30, 40]. What is the array afterwards?
- A.
[10, 12, 15, 30, 40, 20]
- B.
[12, 10, 15, 30, 40, 20]
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Heaps and Priority Queues question
12 is inserted into the min-heap [10, 20, 15, 30, 40]. What is the array afterwards?
[10, 12, 15, 30, 40, 20]
[12, 10, 15, 30, 40, 20]
Sign up free to see the answer and a step-by-step explanation.
[10, 20, 15, 30, 40, 12]
[10, 20, 12, 30, 40, 15]