-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
75 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/Jumping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package hoa.can.code.gg; | ||
|
||
public interface Jumping { | ||
boolean canJump(int[] nums); | ||
int minJumps(int[] arr); | ||
} |
10 changes: 4 additions & 6 deletions
10
interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/JumpingDP.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
interview_prep/algorithm/java/src/main/java/hoa/can/code/gg/JumpingGreedily.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
interview_prep/algorithm/java/src/test/java/hoa/can/code/JumpingDPTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package hoa.can.code; | ||
|
||
import hoa.can.code.gg.JumpingDP; | ||
|
||
public class JumpingDPTest extends JumpingTest { | ||
public JumpingDPTest() { | ||
super(new JumpingDP()); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
interview_prep/algorithm/java/src/test/java/hoa/can/code/JumpingGreedyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package hoa.can.code; | ||
|
||
import hoa.can.code.gg.JumpingGreedily; | ||
|
||
public class JumpingGreedyTest extends JumpingTest { | ||
public JumpingGreedyTest() { | ||
super(new JumpingGreedily()); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
interview_prep/algorithm/java/src/test/java/hoa/can/code/JumpingRecTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package hoa.can.code; | ||
|
||
import hoa.can.code.gg.JumpingRecursive; | ||
|
||
public class JumpingRecTest extends JumpingTest { | ||
public JumpingRecTest() { | ||
super(new JumpingRecursive()); | ||
} | ||
|
||
@Override | ||
public void slow() { | ||
// do nothing since it will freeze | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters