feat: master-controller #11
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request implements the main Sorter.sort() static method, which acts as a dispatcher for the various sorting algorithms in the class.
It provides a single, unified entry point for users, allowing them to select the desired algorithm (merge, insertion, or bubble) via a string parameter.
Closes #6
Changes
Added the sort() method to the Sorter class in sort.py.
The method normalizes the method parameter to lowercase for case-insensitive matching.
It uses an if/elif/else block to delegate to the appropriate sorting method (Sorter.merge(), Sorter.insertion(), or Sorter.bubble()).
A ValueError is raised with a descriptive message if an unknown method is provided.
Important Note
This PR only implements the dispatcher logic. The underlying sorting methods (merge, insertion, bubble) are currently placeholders (pass) and will be implemented in separate issues.
Because of this dependency, the tests for sort() in test_sort.py are expected to fail until the individual sorting algorithms are implemented and merged.