Skip to content

Add Tournament Sort implementation#1579

Open
drori12 wants to merge 1 commit into
TheAlgorithms:masterfrom
drori12:add-tournament-sort
Open

Add Tournament Sort implementation#1579
drori12 wants to merge 1 commit into
TheAlgorithms:masterfrom
drori12:add-tournament-sort

Conversation

@drori12

@drori12 drori12 commented Jun 1, 2026

Copy link
Copy Markdown

Description of Change

Added Tournament Sort algorithm implementation in C. Tournament Sort improves
upon naive Selection Sort by using a min-heap to find the minimum element in
O(log n) instead of O(n), achieving O(n log n) overall time complexity.

References

https://en.wikipedia.org/wiki/Tournament_sort

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Tournament Sort implementation with 6 test cases covering unsorted, sorted, reverse sorted, single element, duplicates, and negative numbers.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant