Skip to content

Commit 5583d80

Browse files
authored
Update minimum-knight-moves.cpp
1 parent cb84111 commit 5583d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-knight-moves.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Solution {
5050
// ex. (2, 1) ~ (14, 13) ~ ... : 1 => 3,3,3 => 5,5,5 => 7,7,7 => 9,9,9 => ...
5151
return k + 2 * ((y - k - 1) / 3 + 1);
5252
}
53-
// if 2y <= x, every period 4 of k (or y) with fixed another is increased by 1
53+
// if 2y <= x, every period 4 of k (or y) with fixed another is increased by 2
5454
// and start from (2k, k) with (k) when y = k (vertical line)
5555
// ex. (0, 0) ~ (11, 0) ~ ... : 0,3(special case),2,3 => 2,3,4,5 => 4,5,6,7 => ...
5656
// ex. (2, 1) ~ (13, 1) ~ ... : 1,2,3,4 => 3,4,5,6 => 5,6,7,8 => ...

0 commit comments

Comments
 (0)