Skip to content
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

about leetcode-cn.com #93

Closed
luchenqun opened this issue Mar 25, 2018 · 6 comments
Closed

about leetcode-cn.com #93

luchenqun opened this issue Mar 25, 2018 · 6 comments

Comments

@luchenqun
Copy link

luchenqun commented Mar 25, 2018

I am Chinese leetcoder。this is the website: https://leetcode-cn.com
Can you provide config to get Chinese problem description and Others.
for example, when i run command"leetcode show 3 -g -l cpp" i get:
[3] Longest Substring Without Repeating Characters

https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/description/

  • algorithms
  • Medium (18.53%)
  • Source Code: 3.longest-substring-without-repeating-characters.2.cpp
  • Total Accepted: 705
  • Total Submissions: 3.9K
  • Testcase Example: '"abcabcbb"'
    Given a string, find the length of the longest substring without repeating characters.
    Examples:
    Given "abcabcbb", the answer is "abc", which the length is 3.
    Given "bbbbb", the answer is "b", with the length of 1.
    Given "pwwkew", the answer is "wke", with the length of 3. Note that the answer must be a substring, "pwke" is a subsequence and not a substring.

I wish to get
[3] Longest Substring Without Repeating Characters
https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/description/

  • algorithms
  • Medium (18.53%)
  • Source Code: 3.longest-substring-without-repeating-characters.2.cpp
  • Total Accepted: 705
  • Total Submissions: 3.9K
  • Testcase Example: '"abcabcbb"'
    给定一个字符串,找出不含有重复字符的 最长子串 的长度。
    示例:
    给定 "abcabcbb" ,没有重复字符的最长子串是 "abc" ,那么长度就是3。
    给定 "bbbbb" ,最长的子串就是 "b" ,长度是1。
    给定 "pwwkew" ,最长子串是 "wke" ,长度是3。请注意答案必须是一个子串,"pwke" 是 子序列 而不是子串。
@skygragon
Copy link
Owner

worth a try to simply replace "leetcode.com" with "leetcode-cn.com" in lib/config.js

@NanayaHaruki
Copy link

I had replaced the urls in config.js and relogin. the problem description is also English.
After I submit the solution,the problem became accepted on https://leetcode-cn.com yet.
And some problems is not the latest version?Index of easy array problems is 766 now,but leetcode list -q e arrayonly show 697

@EINDEX
Copy link
Contributor

EINDEX commented May 15, 2018

I wrote some codes to modify the graphql request.So that It can support Chinese content.But I haven’t tested it on the https://leetcode.com yet.

This is my first time writing nodejs code. it might have some flaws in it , please let me know if you find one .

@skygragon
Copy link
Owner

Good job! @EINDEX
Sorry I don't have a full test against leetcode-cn.com thus not sure if everything (e.g. list/show/test/submit) work the same as leetcode.com. I was told that leetcode-cli could easily talk to leetcode-cn.com by replacing all the URLs configs in leetcode-cli. I'm assuming you did the same while not sure if you ever hit other issues with leetcode-cn.com?

@EINDEX
Copy link
Contributor

EINDEX commented May 16, 2018

@skygragon
The other functions work properly. I just replace "leetcode.com" with "leetcode-cn.com" in lib/config.js .

@skygragon
Copy link
Owner

@ALL a lightweight plugin "leetcode.cn" is available in https://github.com/skygragon/leetcode-cli-plugins/. Basically it does nothing magical except replacing the urls used in leetcode-cli.

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

4 participants