Skip to content

Commit 59d3470

Browse files
authored
Merge pull request #1149 from kanwaekan/kanwaekan-patch-1
Added a comma for clarity, and rectified minor error in equation
2 parents 4214e35 + 64e7f28 commit 59d3470

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/others/tortoise_and_hare.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Lets try to calculate the distance covered by both of the pointers till they poi
8383

8484
<center>!["Proof"](tortoise_hare_proof.png)</center>
8585

86-
$slowDist = a + xL + b$ $x\ge0$
86+
$slowDist = a + xL + b$ , $x\ge0$
8787

88-
$fastDist = a + yL + b$ $y\ge0$
88+
$fastDist = a + yL + b$ , $y\ge0$
8989

9090
- $slowDist$ is the total distance covered by slow pointer.
9191
- $fastDist$ is the total distance covered by fast pointer.
@@ -94,7 +94,7 @@ $fastDist = a + yL + b$ $y\ge0$
9494
- $x$ is the number of times the slow pointer has looped inside the cycle, starting from and ending at **C**.
9595
- $y$ is the number of times the fast pointer has looped inside the cycle, starting from and ending at **C**.
9696

97-
$slowDist = 2 \cdot (fastDist)$
97+
$fastDist = 2 \cdot (slowDist)$
9898

9999
$a + yL + b = 2(a + xL + b)$
100100

0 commit comments

Comments
 (0)