Skip to content

feat: add ascending and descending sorting support to Bubble Sort CLI#558

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
jyotish6699:feature/bubble-sort-order-selection
May 21, 2026
Merged

feat: add ascending and descending sorting support to Bubble Sort CLI#558
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
jyotish6699:feature/bubble-sort-order-selection

Conversation

@jyotish6699
Copy link
Copy Markdown
Contributor

Description

This PR enhances the existing Bubble Sort CLI tool by adding support for both ascending and descending sorting orders.

Users can now choose their preferred sorting order before the sorting operation begins.

Changes Made

  • Added ascending and descending sorting support

  • Added user choice selection for sorting order

  • Improved input validation for invalid sorting choices

  • Added additional test cases for descending order sorting

  • Added edge-case test coverage for:

    • Empty lists
    • Single-element lists
    • Negative numbers
  • Preserved beginner-friendly CLI structure and procedural coding style

Example

Choose sorting order:
1. Ascending
2. Descending

Why This Change

Previously, the Bubble Sort tool only supported ascending order sorting.

This enhancement improves:

  • flexibility
  • usability
  • beginner learning experience
  • understanding of sorting behavior

Testing

Tested successfully with:

  • Ascending sorting
  • Descending sorting
  • Empty input lists
  • Single-element lists
  • Negative numbers
  • Invalid sorting choices

Issue Reference

Closes #552

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

@jyotish6699 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@steam-bell-92 steam-bell-92 merged commit bb16f4a into steam-bell-92:main May 21, 2026
6 of 7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

@jyotish6699 jyotish6699 deleted the feature/bubble-sort-order-selection branch May 21, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add ascending/descending order selection to Bubble Sort CLI tool

2 participants