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

Commit b2de5fc

Browse files
Update Median of Two Sorted Arrays
1 parent 4075883 commit b2de5fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎精選高頻HARD題目/Median of Two Sorted Arrays

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
使之符合 partitionA + partitionB = (m + n + 1) / 2
33
切出 nums1[0 .. partitionA - 1] , nums2[0 .. partitionB - 1] 以及 nums1[partitionA .. m] , nums2[partitionB .. n]
44
且 nums1[partitionA - 1] <= nums2[partitionB] and nums2[partitionB - 1] <= nums1[partitionA]
5-
這樣就代表剛好切到中線上,反之則依照大小關係向左向右推進
5+
這樣就代表剛好切到中線上,反之則依照大小關係向左或向右推進
66

77
Time Complexity : O( log(min(m , n))) for binary searching on the smaller array
88
Space Complexity : O(1) for variables

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /