Skip to content

docs: update lcof problem: No.044 #3777

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

Merged
merged 1 commit into from
Nov 19, 2024
Merged

docs: update lcof problem: No.044 #3777

merged 1 commit into from
Nov 19, 2024

Conversation

lingxier
Copy link
Member

…更通顺的题目描述。

根据原力扣题目https://leetcode.cn/problems/shu-zi-xu-lie-zhong-mou-yi-wei-de-shu-zi-lcof/description/的示例2: 第 12 位数字在序列 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... 里是 1 ,它是 11 的一部分。

可以发现,其用意中的序列从1开始即1234567891011。

但是题目明显不符合,所以我们仓库贡献者特意修改了一下,将第5位(从下标0开始计数)是5,这里添加了一个括号。

但我觉得是原题目描述上存在误导,力扣原题目我也提了issue,正在处理中。

建议直接在题干中说明序列是从1开始的,去掉示例序列中的0,并且将我们的仓库贡献者良苦用心写的括号提示”从下标0开始计数“去掉,因为仓库贡献者也知道一般来说第k位这种说法就是从第一位即数组下标为0开始的这种默认常识。

即修改为
”数字以123456789101112131415…的格式序列化到一个字符序列中。在这个序列中,第5位是5,第13位是1,第19位是4,等等。“

…更通顺的题目描述。

根据原力扣题目https://leetcode.cn/problems/shu-zi-xu-lie-zhong-mou-yi-wei-de-shu-zi-lcof/description/的示例2:
第 12 位数字在序列 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... 里是 1 ,它是 11 的一部分。

可以发现,其用意中的序列从1开始即1234567891011。

但是题目明显不符合,所以我们仓库贡献者特意修改了一下,将第5位(从下标0开始计数)是5,这里添加了一个括号。

但我觉得是原题目描述上存在误导,力扣原题目我也提了issue,正在处理中。

建议直接在题干中说明序列是从1开始的,去掉示例序列中的0,并且将我们的仓库贡献者良苦用心写的括号提示”从下标0开始计数“去掉,因为仓库贡献者也知道一般来说第k位这种说法就是从第一位即数组下标为0开始的这种默认常识。

即修改为
”数字以123456789101112131415…的格式序列化到一个字符序列中。在这个序列中,第5位是5,第13位是1,第19位是4,等等。“
@idoocs
Copy link
Member

idoocs commented Nov 18, 2024

🤭 感谢你的提交,请检查你的改动是否符合以下项目规范。

1. 格式化

我们项目中各种编程语言代码(包括文档)所采用的格式化工具不同,提交 pr 之前必须确保代码、文档正确格式化。

  • .{md,js,ts,php,sql,rs} 采用 prettier
  • .{c,cpp,java} 采用 clang-format
  • .{py} 采用 black
  • .{go} 采用 gofmt
  • 其它待完善

2. Git 提交信息

我们项目遵循 AngularJS Git Commit Message Conventions 规范,我们希望你的提交信息尽可能与项目保持一致。

  • 新增或修改题解:feat: add/update solution(s) to lc problem(s): No.xxxx
  • 修复错误:fix: xxxx
  • 日常维护:chore: xxx

3. 其它补充

新增题解及代码时,需要创建 Solution.xxx 源代码文件(如果已存在,请确认算法是否更优,是则覆盖已有算法代码),同时,需要在 README.md 以及 README_EN.md 中添加对应的代码片段(英文文件中不要出现中文注释)
另外,编码风格(比如变量、函数的命名),尽量跟项目已有代码保持一致。


🤭 Thank you for your contribution. Please check if your changes comply with the following project specifications.

1. Formatting

We use different formatting tools for various programming languages (including documentation) in our project. You must ensure that the code and documentation are correctly formatted before submitting a pr.

  • .{md,js,ts,php,sql,rs} use prettier
  • .{c,cpp,java} use clang-format
  • .{py} use black
  • .{go} use gofmt
  • Others to be improved

2. Git Commit Message

Our project follows the AngularJS Git Commit Message Conventions. We hope that your submission information is as consistent as possible with the project.

  • Add or modify solutions: feat: add/update solution(s) to lc problem(s): No.xxxx
  • Fix errors: fix: xxxx
  • Routine maintenance: chore: xxx

3. Other notes

When adding solutions and code, you need to create a Solution.xxx source code file (if it already exists, please confirm whether the algorithm is better, if yes, overwrite the existing algorithm code), and at the same time, you need to add the corresponding code snippets in README.md and README_EN.md (do not have Chinese comments in the English file)
In addition, the coding style (such as the naming of variables and functions) should be as consistent as possible with the existing code in the project.

@idoocs idoocs added the md Issues or Pull requests relate to .md files label Nov 18, 2024
@yanglbme yanglbme changed the title fix(Update README.md):由于力扣原题目产生误导,建议我们领先力扣(针对力扣原题目已提issue)直接修正为大家常识理解… docs: update lcof problem: No.044 Nov 19, 2024
@yanglbme yanglbme merged commit da7abd7 into doocs:main Nov 19, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
md Issues or Pull requests relate to .md files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants