Skip to content

Commit 80235fa

Browse files
committed
fix: update
1 parent dc9aeba commit 80235fa

File tree

1 file changed

+1
-1
lines changed
  • solution/0600-0699/0600.Non-negative Integers without Consecutive Ones

1 file changed

+1
-1
lines changed

solution/0600-0699/0600.Non-negative Integers without Consecutive Ones/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The function executes as follows:
8686

8787
If $i$ exceeds the length of the number $n$, i.e., $i < 0$, it means the search is over, directly return $1$. Otherwise, we enumerate the digits $j$ from $0$ to $\textit{up}$ for the position $i$. For each $j$:
8888

89-
- If both $\textit{pre}$ and $j$ are $1$, it means there are consecutive $1$s, so we skip it.
89+
- If both $\textit{pre}$ and $j$ are $1$, it means there are consecutive $1$, so we skip it.
9090
- Otherwise, we recurse to the next level, update $\textit{pre}$ to $j$, and update $\textit{limit}$ to the logical AND of $\textit{limit}$ and whether $j$ equals $\textit{up}$.
9191

9292
Finally, we sum all the results from the recursive calls to the next level, which is the answer.

0 commit comments

Comments
 (0)