8000 Missing No.742 & 758 in list · Issue #82 · skygragon/leetcode-cli · GitHub
[go: up one dir, main page]

Skip to content

Missing No.742 & 758 in list #82

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 < 8000 a class="Link--inTextBlock" href="https://docs.github.com/privacy" target="_blank">privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shaodan opened this issue Jan 4, 2018 · 5 comments
Closed

Missing No.742 & 758 in list #82

shaodan opened this issue Jan 4, 2018 · 5 comments

Comments

@shaodan
Copy link
shaodan commented Jan 4, 2018

Problem Summary

Problem 742 is listed as No.743, (No.742 is skipped)
Problem 743 is listed as No.744,
...
Problem 756 is listed as No.757,
Problem 757(newest problem) is listed as No.759 (No.758 is skipped)

leetcode show 742 got [ERROR] Problem not found! [0]

How to reproduce

leetcode list
leetcode show 742

Environment

  • leetcode-cli version:
  • OS version: Ubuntu 16.04
  • Node version: v8.1.4
  • Npm version: 5.4.2

image
image
image

@skygragon
Copy link
Owner
skygragon commented Jan 4, 2018

That's a known mismatch of leetcode.com itself, it uses 2 different ids for same question, e.g.

{
  "status": null,
  "stat": {
    "total_acs": 2054,
    "question__title": "Closest Leaf in a Binary Tree",
    "is_new_question": false,
    "question__article__slug": "closest-leaf-in-binary-tree",
    "total_submitted": 6307,
    "frontend_question_id": 742,
    "question__title_slug": "closest-leaf-in-a-binary-tree",
    "question__article__live": true,
    "question__hide": false,
    "question_id": 743
}

You see for this "Closest Leaf in a Binary Tree", its backend id is 743 (used by leetcode-cli), while its frontend id is 742 (shown on webpage).

I guess leetcode.com is not showing all the questions to users (e.g. some very new questions are usually filtered out, or some questions are deleted for some reason?), anyway, there are gaps in the list, but on web page they try to hide those gaps thus invent a "frontend id" to work around this, just a bold guess...

@skygragon
Copy link
Owner
8000

@shaodan btw, what's your terminal in the screenshot above? I notice the list output is not well aligned, I guess it's caused by a non-mono font?

@shaodan
Copy link
Author
shaodan commented Jan 5, 2018

@skygragon I'm visiting a jupyter terminal console, seems chrome cannot display check icon and lock icon with monospace font.

skygragon added a commit that referenced this issue Jan 5, 2018
Signed-off-by: Eric Wang <skygragon@gmail.com>
@skygragon
Copy link
Owner

@shaodan could you try this latest commit to see if the id matches the web page?

$ npm install -g skygragon/leetcode-cli

Please let me know if there are new issues caused by this commit.

@shaodan
Copy link
Author
shaodan commented Jan 6, 2018

@skygragon It works! thanks for your quick response.

7081

15cm pushed a commit to 15cm/leetcode-cli that referenced this issue Jun 13, 2018
Signed-off-by: Eric Wang <skygragon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0