Comments (3)
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.
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.
如 solved
from leetcode.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leetcode.