Skip to content

Commit 45a57d0

Browse files
refactor 4
1 parent 0dd40b3 commit 45a57d0

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The median is (2 + 3)/2 = 2.5
2222
*/
2323
public class _4 {
2424

25-
class Solution1 {
25+
public static class Solution1 {
2626
/**credit: https://discuss.leetcode.com/topic/28602/concise-java-solution-based-on-binary-search
2727
*
2828
* The key point of this problem is to ignore half part of A and B each step recursively by comparing the median of remaining A and B:
@@ -68,7 +68,7 @@ public double getkth(int[] A, int aStart, int[] B, int bStart, int k) {
6868
}
6969
}
7070

71-
class Solution2 {
71+
public static class Solution2 {
7272
/**
7373
* Reference: https://leetcode.com/discuss/28843/my-accepted-java-solution:
7474
* Basic Idea is very similar to K-selection. it's easier to understand if you imagine this to be chopping off the last K elements from a total of len(A) + len(B) elements,

0 commit comments

Comments
 (0)