Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45a57d0

Browse files
refactor 4
1 parent0dd40b3 commit45a57d0

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The median is (2 + 3)/2 = 2.5
2222
*/
2323
publicclass_4 {
2424

25-
classSolution1 {
25+
publicstaticclassSolution1 {
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-
classSolution2 {
71+
publicstaticclassSolution2 {
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)

[8]ページ先頭

©2009-2025 Movatter.jp