Skip to content

Fix empty input edge case and correct output formatting#14444

Merged
MaximSmolskiy merged 7 commits intoTheAlgorithms:masterfrom
mahema-14:fix-pigeonhole-bug
Apr 10, 2026
Merged

Fix empty input edge case and correct output formatting#14444
MaximSmolskiy merged 7 commits intoTheAlgorithms:masterfrom
mahema-14:fix-pigeonhole-bug

Conversation

@mahema-14
Copy link
Copy Markdown
Contributor

@mahema-14 mahema-14 commented Mar 25, 2026

Description

Fixed an issue where the pigeonhole_sort function would fail for empty input lists by adding a guard clause.

Also corrected output formatting in the main function by converting integers to strings before using join(), preventing runtime errors.

Type of change

  • Fix a bug or typo in an existing algorithm

Checklist

  • I have read the contributing guidelines
  • This PR is my own work
  • This PR changes only one algorithm file

@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Mar 25, 2026
@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Apr 10, 2026
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Apr 10, 2026
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label Apr 10, 2026
@MaximSmolskiy MaximSmolskiy merged commit fc2f947 into TheAlgorithms:master Apr 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants