Skip to content

Commit b2de5fc

Browse files
authored
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy