Skip to content

Add introspective sort implementations#94

Open
BMNTR wants to merge 1 commit into
Ashrockzzz2003:mainfrom
BMNTR:codex/add-introspective-sort
Open

Add introspective sort implementations#94
BMNTR wants to merge 1 commit into
Ashrockzzz2003:mainfrom
BMNTR:codex/add-introspective-sort

Conversation

@BMNTR
Copy link
Copy Markdown

@BMNTR BMNTR commented May 28, 2026

Closes #73.

Summary

  • Added a Python implementation of introspective sort that starts with quicksort, falls back to heapsort at the recursion-depth limit, and uses insertion sort for small partitions.
  • Added a Java implementation with the same quicksort/heapsort/insertion-sort hybrid behavior and a small runnable demo.

Validation

  • python sorting/introspective_sort/introspective_sort.py
  • python -m py_compile sorting/introspective_sort/introspective_sort.py
  • git diff --check

Note: Java compilation was not run locally because this environment does not have a JDK installed.

Implemented with assistance from OpenAI Codex.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add .java and .py implementation of introspective sort

1 participant