Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b4f2bb1

Browse files
refactor 390
1 parent 8b8e3f3 commit b4f2bb1

File tree

1 file changed

+0
-24
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-24
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 390. Elimination Game
5-
*
6-
* There is a list of sorted integers from 1 to n.
7-
* Starting from left to right,
8-
* remove the first number and every other number afterward until you reach the end of the list.
9-
* Repeat the previous step again, but this time from right to left,
10-
* remove the right most number and every other number from the remaining numbers.
11-
* We keep repeating the steps again, alternating left to right and right to left, until a single number remains.
12-
* Find the last number that remains starting with a list of length n.
13-
14-
Example:
15-
16-
Input:
17-
n = 9,
18-
1 2 3 4 5 6 7 8 9
19-
2 4 6 8
20-
2 6
21-
6
22-
23-
Output:
24-
6
25-
26-
*/
273
public class _390 {
284

295
public static class Solution1 {

0 commit comments

Comments
 (0)