Skip to content

feat: add sorting options to problem list #14

Description

@Jatin-Shihora

The problem list is displayed in the order by problem number. There's no way to sort by difficulty, acceptance rate, or status. If you want to find the easiest problems by acceptance rate, you have to scan the entire list visually.

What should happen
Add a sort toggle with a key (like o for "order"). Cycle through sort options:

  • By number (default, ascending)
  • By difficulty (Easy first or Hard first)
  • By acceptance rate (highest first or lowest first)
  • By status (unsolved first)

Show the active sort order in the header/status bar.

Things to consider

  • All the data needed for sorting is already in ProblemSummary. No extra API calls required
  • Sorting should work on the filtered list (after difficulty filter is applied)
  • Preserve the current sort when switching pages or refreshing
  • Consider allowing ascending/descending toggle (pressing the same sort key again reverses direction)
  • Reset cursor to top when sort order changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions