Coder Social home page Coder Social logo

Problem 3146 not found. about leetcode HOT 3 CLOSED

chenyueg avatar chenyueg commented on July 17, 2024
Problem 3146 not found.

from leetcode.

Comments (3)

juyingnan avatar juyingnan commented on July 17, 2024

The issue was due to the outdated problems.json file. I did not find a perfect solution to automatically update the problems.json file when an ID was not found in the current list, since LeetCode uses Cloudflare protection.

The current solution is to show a hint to ask the user to go to: https://leetcode.com/api/problems/all/ and manually copy and paste the latest problems.json file.

The original file is a single-line but large JSON file (>2.5 MB). To make fewer changes each time this file is updated, I added a JSON formatter to convert the single-line JSON to a normal multi-line JSON format so the git diff can work for this file. The formatter will run silently (unless it detects that the JSON needs to be formatted) each time the problem finder script is executed.

Also, the simple way, the script will print: "Or, you can call Bunny to solve this problem."

from leetcode.

juyingnan avatar juyingnan commented on July 17, 2024

I did not expect the JSON file to be frequently updated. So if it changes a lot by Leetcode frequently, it brings another issue: each time it is updated, the total_acs and total_submitted data will also be updated, resulting in 2 x problem_count lines changing.

Since I am not sure if these two lines (and the hidden AC rate calculated by dividing these two data points) will be used in the future, simply removing these two lines when formatting the JSON does not seem to be the best idea.

So let it be.

            "total_acs": 5759632,
            "total_submitted": 16549931,

from leetcode.

juyingnan avatar juyingnan commented on July 17, 2024

如 solved

from leetcode.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.