Skip to content

[Feature]: Add problem difficulty breakdown (Easy / Medium / Hard) to each leaderboard entry #365

Closed as not planned

Description

@divyanshim27

Summary

The leaderboard currently shows only a total problems-solved count per user. The LeetCode API (used via the leetcode-api service) returns a breakdown by difficulty — Easy, Medium, Hard — but this data is not displayed in the UI. Surfacing the difficulty split would give a much more meaningful picture of each student's skill level and effort.

Problem

  • Raw total-solved counts treat an Easy problem the same as a Hard problem, which does not accurately reflect a student's problem-solving depth.
  • Two students with the same total count but vastly different difficulty distributions appear identical on the leaderboard — this is misleading.
  • The underlying API already returns this data; it is just not being used in the frontend rendering.
  • Competitive platforms like LeetCode's own weekly contest leaderboard prominently feature difficulty-based breakdowns because they are the primary signal of relative performance.

Proposed Solution

Data layer (scripts/sync-leaderboard.js):

Ensure easySolved, mediumSolved, and hardSolved are persisted in the leaderboard JSON alongside totalSolved.

Frontend (frontend/):

Add a compact difficulty bar or three-column breakdown under each user's name:

Rank Username Total Easy Medium Hard
1 student123 142 61 52 29
2 coder456 138 70 48 20

Optionally, colour-code the columns (green / yellow / red) to match LeetCode's own convention.

Sorting option:

Add a "Sort by Hard" toggle so users competing at the advanced level have a relevant ranking axis.

I can implement the data layer and frontend changes in a single PR. Could you assign this issue to me?

Labels: enhancement, feature, ui, data, GSSoC 2026

Activity

  1. github-actions commented on Jul 25, 2026

    @github-actions
    Contributor

    Thank you for opening an issue.

    Please review our CONTRIBUTING.md guidelines before getting started.

    A maintainer will review this issue shortly. If you would like to work on the issue yourself, please leave a comment requesting assignment.

    Issue Assignment Policy

    • The issue creator is given the first priority to work on their issue.
    • If the creator declines or does not request assignment, the issue will be assigned to others in the order of requests received.
    • Please do not submit PRs or begin work until you are officially assigned.

    Note: This project is currently maintained by a solo maintainer, so reviews, assignments, and responses may sometimes take a little time. Thanks for your patience.

  2. Yashaswini-K-P commented on Jul 26, 2026

    @Yashaswini-K-P
    Contributor

    This issue already exists and marked as blocked for now

  3. jagdish-15 commented on Jul 28, 2026

    @jagdish-15
    Collaborator
    Image

    From the screenshot above, you can clearly see that many users with a higher total solved count are ranked below users with a lower total solved count. This is because the leaderboard uses a weighted scoring system, not the raw total solved count. So the initial assumption in this issue is incorrect.

    As for the sorting options, that's already covered in #272, as @Yashaswini-K-P pointed out.

    If this issue isn't proposing anything beyond what's already covered, feel free to close it.

  4. aaniya22 commented on Jul 28, 2026

    @aaniya22
    Contributor

    pls assign this to me under gssoc

  5. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    This issue has been inactive for 14 days and has been marked as stale. To keep this issue open, please leave a comment.

  6. Yashaswini-K-P commented on Aug 12, 2026

    @Yashaswini-K-P
    Contributor

    working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions