Java: Iterative HeapSort

Level : Intermediate
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 00:30:00

Lab Details

Problem Statement:

HeapSort is a comparison-based sorting technique where we first build Max Heap and then swap

the root element with the last element (size times) and maintains the heap property each time

to finally make it sorted. Write a Program to implement Heap sort in Java.1.

Example

Input:

10 20 15 17 9 21

Output:

9 10 15 17 20 21
Self-paced Membership
  • 22+ Courses
  • 750+ Hands-On Labs
  • 200+ Quick Notes
  • 55+ Skill Tests
  • 45+ Interview Q&A
  • 10+ Real-world Projects
  • Career Coaching
  • Email Support
Upto 66% OFF
KNOW MORE..

To get full access to all courses

Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this