Skip to content

Commit 7847abe

Browse files
refactor 1033
1 parent a308079 commit 7847abe

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/main/java/com/fishercoder/solutions/_1033.java

-22
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22

33
import java.util.Arrays;
44

5-
/**
6-
* 1033. Moving Stones Until Consecutive
7-
*
8-
* Three stones are on a number line at positions a, b, and c.
9-
*
10-
* Each turn, you pick up a stone at an endpoint (ie., either the lowest or highest position stone),
11-
* and move it to an unoccupied position between those endpoints.
12-
* Formally, let's say the stones are currently at positions x, y, z with x < y < z.
13-
* You pick up the stone at either position x or position z, and move that stone to an integer position k, with x < k < z and k != y.
14-
*
15-
* The game ends when you cannot make any more moves, ie. the stones are in consecutive positions.
16-
*
17-
* When the game ends, what is the minimum and maximum number of moves that you could have made?
18-
* Return the answer as an length 2 array: answer = [minimum_moves, maximum_moves]
19-
*
20-
* Note:
21-
* * 1 <= a <= 100
22-
* * 1 <= b <= 100
23-
* * 1 <= c <= 100
24-
* * a != b, b != c, c != a
25-
*/
26-
275
public class _1033 {
286
public static class Solution1 {
297
private int minMoves(int x, int y, int z) {

0 commit comments

Comments
 (0)