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

[FEAT]: Implement an array sorting script #116

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

martinvibes
Copy link

πŸ“ Pull Request Title

[FEAT]: Implement Sorting Algorithms

πŸ› οΈ Issue

Closes #105

πŸ“– Description

This PR implements sorting algorithms to provide efficient array sorting capabilities. The implementation includes:

Created interface.cairo defining Sortable and SortableVec traits for consistent sorting interfaces
Implemented QuickSort algorithm with optimized pivot selection
Added Alexandria data structures as a dependency for vector operations
Structured the code in a modular way with separate files for interface and implementation
Fixed compilation issues and imports
Added proper error handling for edge cases (empty arrays, single elements)

πŸ–ΌοΈ Screenshots

N/A - Implementation is code-only
πŸ“ Additional Notes

The implementation supports both array and vector-based sorting
The code is prepared for future additions of other sorting algorithms
Tested with various input sizes and types
All files include proper documentation and type annotations

@martinvibes
Copy link
Author

hey @coxmars kindly review :)

@danielcdz danielcdz added the ODBoost This issue will be available ONLY during the ODBoost label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ODBoost This issue will be available ONLY during the ODBoost
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Implement an array sorting script
2 participants