Skip to content

Commit 1e0ddb7

Browse files
committed
fix: code
1 parent f51bdc4 commit 1e0ddb7

File tree

1 file changed

+2
-2
lines changed
  • solution/0300-0399/0365.Water and Jug Problem

1 file changed

+2
-2
lines changed

solution/0300-0399/0365.Water and Jug Problem/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ tags:
7676

7777
### 方法一:DFS
7878

79-
我们不妨记 $jug1Capacity$ 为 $x$, $jug2Capacity$ 为 $y$, $targetCapacity$ 为 $z$。
79+
我们不妨记 $\text{jug1Capacity}$ 为 $x$, $\text{jug2Capacity}$ 为 $y$, $\text{targetCapacity}$ 为 $z$。
8080

8181
接下来,我们设计一个函数 $dfs(i, j)$,表示当前 $jug1$ 中有 $i$ 升水,$jug2$ 中有 $j$ 升水,是否可以得到 $z$ 升水。
8282

@@ -89,7 +89,7 @@ tags:
8989

9090
答案即为 $dfs(0, 0)$。
9191

92-
时间复杂度 $O(x + y)$,空间复杂度 $O(x + y)$。其中 $x$ 和 $y$ 分别为 $jug1Capacity$ 和 $jug2Capacity$ 的大小
92+
时间复杂度 $O(x + y)$,空间复杂度 $O(x + y)$。其中 $x$ 和 $y$ 分别为 $\text{jug1Capacity}$ 和 $\text{jug2Capacity}$
9393

9494
<!-- tabs:start -->
9595

0 commit comments

Comments
 (0)