mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-04 05:44:35 +00:00
[PR #1499] [CLOSED] feat: Add IntroSort algorithm in C #2100
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1499
Author: @sgindeed
Created: 10/8/2025
Status: ❌ Closed
Base:
master← Head:feat/intro-sort-sgindeed📝 Commits (1)
96beba9[FEATURE] Add IntroSort algorithm in C📊 Changes
1 file changed (+147 additions, -0 deletions)
View changed files
➕
sorting/intro_sort.c(+147 -0)📄 Description
Description of Change
Added an implementation of IntroSort (Introspective Sort) in C.
IntroSort is a hybrid sorting algorithm that begins with QuickSort, switches to HeapSort when the recursion depth exceeds a limit, and uses InsertionSort for small subarrays.
This approach achieves both fast average performance and optimal worst-case behavior — the same principle used by
std::sortin C++.References
Implements #1488
Checklist
Notes: Added a practical, high-performance hybrid sorting algorithm combining QuickSort, HeapSort, and InsertionSort for balanced performance and guaranteed O(n log n) complexity in the worst case.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.