Skip to content

feat: Add A search and heap sort implementations with tests#67

Merged
monkey0722 merged 6 commits intomainfrom
feat/20261229
Dec 29, 2025
Merged

feat: Add A search and heap sort implementations with tests#67
monkey0722 merged 6 commits intomainfrom
feat/20261229

Conversation

@monkey0722
Copy link
Owner

This pull request introduces two new algorithm implementations: A* Search for graph pathfinding and Heap Sort for array sorting, along with comprehensive test suites for both. Additionally, it updates the pre-commit hooks to use yarn for running formatting and linting scripts. The most important changes are grouped below:

Algorithm Implementations

  • Added a complete A* Search algorithm in aStar.ts, including support for custom heuristics, and utility functions for Manhattan and Euclidean heuristics.
  • Implemented Heap Sort in heapSort.ts with support for custom comparators and thorough documentation.

Test Coverage

  • Added extensive unit tests for A* Search in aStar.test.ts, covering basic, grid-based, and edge-case scenarios, as well as heuristic function correctness.
  • Added robust test suite for Heap Sort in heapSort.test.ts, covering various input types and custom comparator usage.

Tooling Improvements

  • Updated the lefthook.yml pre-commit configuration to run prettier and eslint via yarn, ensuring consistency with project tooling.

@monkey0722 monkey0722 self-assigned this Dec 29, 2025
@monkey0722 monkey0722 merged commit 7a68f47 into main Dec 29, 2025
1 check passed
@monkey0722 monkey0722 deleted the feat/20261229 branch December 29, 2025 11:18
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.

1 participant

Comments