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

修订 0139.单词拆分.md #1128

Merged
merged 1 commit into from
Mar 19, 2022

Conversation

Guicai996
Copy link
Contributor

删除原Line 102,修改memory数组为bool型
因为根据执行顺序,Line 101的if判断句,只有在前一个判断返回true的时候才会递归,因此若执行到memory[startIndex] = 1时,程序已经完成了遍历,memory[startIndex] = 1的情况完全没用的上。而memory用上的情况为false重复,即程序已经判断过startIndex开头无法分割。

删除原Line 102,修改memory数组为bool型
因为根据执行顺序,Line 101的if判断句,只有在前一个判断返回true的时候才会递归,因此若执行到memory[startIndex] = 1时,程序已经完成了遍历,memory[startIndex] = 1的情况完全没用的上。而memory用上的情况为false重复,即程序已经判断过startIndex开头无法分割。
@youngyangyang04 youngyangyang04 merged commit 5023c9d into youngyangyang04:master Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants