leetcode_problem_rating icon indicating copy to clipboard operation
leetcode_problem_rating copied to clipboard

Take a look at this issue if you come up with more features

Open zerotrac opened this issue 2 years ago • 7 comments

The aim of this whole project is to:

  • Calculate the rating of every contest problem based on the statistics of the corresponding participants. This part is not open-sourced.
  • Store the ratings in a file called ratings.txt in this repository.
  • Visualize the ratings in a user-friendly way by developing a frontend. This part is open-sourced and is also in this repository.

If you would like to use the data to customize your own LeetCod-ing plan (e.g. solving problems that have rating ~200 more than your current rating), you can just use the ratings.txt file. It is well-structured, taking <10 minutes programming in Python to parse everything. I may not try to develop features like #12 (add tags for each problem) or #14, because a LeetCode-like website is not what I am aiming at.

The best way to use this project is:

  • If you need a quick check of the problem rating, just use the website. You can choose a specific problem or contest, search by keyword, sort, and filter by a rating interval.
  • If you would like to have a customized LeetCod-ing plan, you can use the ratings.txt file to track your own pace.

I am pretty sure that the LeetCode official are now working on similar features. After the official version is fully developed, it will be something showing together with the problems in the LeetCode website, so all the issues will no longer exist anymore.

zerotrac avatar Jun 25 '22 02:06 zerotrac

Do you ever plan to open source the closed source part? I'm curious how you calculated the ratings just for learning. Specifically confused about how you used MLE to do this.

srajabi avatar Jan 11 '23 22:01 srajabi

What do the rating of the problems mean? And what do they mean in terms of my own contest rating?

laraconda avatar May 04 '23 16:05 laraconda

What do the rating of the problems mean? And what do they mean in terms of my own contest rating?

You can think of the problem ratings having the same metrics with the contest ratings.

  • You solve lots of problems in the contests -> your contest rating is high.
  • A problem "beats" lots of contestants (i.e. it is not solved by them) ->the problem rating should be high.

zerotrac avatar May 04 '23 17:05 zerotrac

Yes. This I understand. But what does it mean exactly? I am 1600 in leetcode, if I encounter a 1600 problem in a contest does it mean I will solve it 100% of the time? 50, 10%? There has to exist an interpretation for the relationship between a contestant rating and a problem rating. Even if its not in so specific terms: Is there a good chance I will find it challenging, easy, very hard?

laraconda avatar May 04 '23 19:05 laraconda

Yes. This I understand. But what does it mean exactly? I am 1600 in leetcode, if I encounter a 1600 problem in a contest does it mean I will solve it 100% of the time? 50, 10%? There has to exist an interpretation for the relationship between a contestant rating and a problem rating. Even if its not in so specific terms: Is there a good chance I will find it challenging, easy, very hard?

I think it is 50%. From my experience, Easy: [0, Your rating - 300]; Medium: [Your rating - 300, Your rating]; Hard: [Your rating, Your rating + 300]; Very hard: [Your rating + 300, Infinity]. You can argue about 300 to be 200 or 400, etc.

But don't make it so complex, just finish all the questions in [Your rating, Your rating + 300]. So if your rating is 1600, then you just work as many questions as possible in rating from 1600 to 1900 from this list, then you will improve your algorithm skill. If your rating is increased to 1700, then just work on questions in this list with ratings from 1700 to 2000, etc. You can argue about +300 to be +200 or +400 etc, but what I want to say is to just work on problems slightly higher than your current rating and don't make it so complex. Then you will improve.

yanrs17 avatar May 04 '23 22:05 yanrs17

Yes. This I understand. But what does it mean exactly? I am 1600 in leetcode, if I encounter a 1600 problem in a contest does it mean I will solve it 100% of the time? 50, 10%? There has to exist an interpretation for the relationship between a contestant rating and a problem rating. Even if its not in so specific terms: Is there a good chance I will find it challenging, easy, very hard?

Pr[a contestant with rating x solves a problem with rating y] = 1 / (1 + 10^((y-x)/400)). Reference: https://en.wikipedia.org/wiki/Elo_rating_system

zerotrac avatar May 04 '23 22:05 zerotrac

The tool itself is awesome, me and friends of mine are using it actively while practicing.

Recently I took a look at https://leetcode.com/api/problems/algorithms/ and understood that response from this authenticated API can be used to filter tasks based on whether they have been solved or not. I sketched out the code to "join" this data to the list of tasks, and be able to filter it, but for now I succeed only with using data which were previously saved as json file.

Not having much experience in front-end, I'm struggling to propose any viable solution that would "download" api data of currently logged-in leetcode user directly from API. What's your opionion, how could this be done using front-end only, so that the app would remain stateless? What would be the right direction for it?

while it's a bit of off-topic here, I would appreciate your input thanks in advance

gneginskiy avatar Dec 30 '23 19:12 gneginskiy

@gneginskiy working on something similar here: https://upsolve.pritish.in/ , and the auto filtering is doable but a bit of a hassle, its wip: https://github.com/PritishMishraa/leetcode-upsolve/tree/auto-refresh

PritishMishraa avatar Apr 21 '24 13:04 PritishMishraa