Year End Sale: Get Upto 40% OFF on Live Training! Offer Ending in
D
H
M
S
Get Now

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
  • 24+ Video Courses
  • 825+ Hands-On Labs
  • 400+ Quick Notes
  • 125+ Skill Tests
  • 10+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this