Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Adding Heap Sort in Sorting Algorithm #316

Open
4 tasks done
ParasY1724 opened this issue Nov 3, 2024 · 1 comment
Open
4 tasks done

[Feature Request]: Adding Heap Sort in Sorting Algorithm #316

ParasY1724 opened this issue Nov 3, 2024 · 1 comment

Comments

@ParasY1724
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

Heap Sort: This algorithm uses a binary heap data structure to sort elements, efficiently performing selection operations.

Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure to sort elements efficiently. It operates in two main phases: first, it builds a max heap from the input array, where each parent node is greater than its child nodes. Then, it repeatedly removes the largest element (the root of the heap) and places it at the end of the array, while restructuring the heap to maintain its properties. This process continues until all elements are sorted. Heap Sort has a time complexity of O(n log n) and is in-place, requiring only O(1) additional space, making it suitable for scenarios where memory efficiency is important. However, it is not a stable sort, meaning equal elements may not retain their relative order.

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
  • I'm willing to provide further clarification or assistance if needed.

Full Name

Paras Yerunkar

Participant Role

GSSOC

Copy link
Contributor

github-actions bot commented Nov 3, 2024

🙌 Thank you for bringing this issue to our attention! We appreciate your input and will investigate it as soon as possible.

Feel free to join our community on Discord to discuss more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants