-
Notifications
You must be signed in to change notification settings - Fork 142
Fixed the problem of generating wrong id #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Leetcode problems have both "frontend id" and "backend id". All problems in the repo are indexed with their "backend id". The framework accepts "frontend id" to generate the problem file (with backend id). It's a feature by design, for some reason. |
@@ -42,7 +42,7 @@ pub fn get_problem(frontend_question_id: u32) -> Option<Problem> { | |||
content: resp.data.question.content, | |||
sample_test_case: resp.data.question.sample_test_case, | |||
difficulty: problem.difficulty.to_string(), | |||
question_id: problem.stat.question_id, | |||
question_id: problem.stat.frontend_question_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Judging by problem.stat.frontend_question_id at line 23
Generating from question_id: problem.stat.question_id at line 45
I am not quite sure why it is a feature ( indexed by front id but generated by backend id) |
@Qanora I have not noticed that the Here is my conclusion after looking at the response of leetcode API: The While |
I agree with you, so is this ready to merge? @aylei |
All existing problem files need id remapping for consistency as well, with respect to this update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! @Qanora |
I found When you generated problem Confusing... |
I tried to generate problem |
It's the fact that leetcode team sometimes shifts front-end id. "Jump Game V" was 1344 and is 1340. IMO, current PR has no fault. There is no easy way to deal with that. |
[description]
when i typed 1000,
I got n1030_minimum_cost_to_merge_stones.rs
[fixed]
Incorrect use tag "problem.stat.frontend_question_id" vs "problem.stat.question_id"