Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
LeetCodeAnimation
Commits
06076dec
Unverified
Commit
06076dec
authored
Jun 24, 2021
by
程序员吴师兄
Committed by
GitHub
Jun 24, 2021
Browse files
Merge pull request #130 from jesee030/fix_spell
Update 0004-median-of-two-sorted-arrays.md
parents
57340038
691a4e51
Changes
1
Hide whitespace changes
Inline
Side-by-side
0004-median-of-two-sorted-arrays/Article/0004-median-of-two-sorted-arrays.md
View file @
06076dec
...
...
@@ -42,7 +42,7 @@ nums2 = [3, 4]

如图,我们要找到一组A,B,满足上面3条规则。
对于规则1,我们在数组1中找任意A,然后根据规则1就能推算出对应的B的位置。
对于规则2,由于数组1和2都是有序数组,即X1<A<Y1;X2<B<Y2。我们实际上只需要判断A是否小于Y2,以及B是否小于Y
2
。
对于规则2,由于数组1和2都是有序数组,即X1<A<Y1;X2<B<Y2。我们实际上只需要判断A是否小于Y2,以及B是否小于Y
1
。
对于规则3,由于数组1和2都是有序数组,因此中位数为A,B中较大的那一项。
那么具体该如何操作呢?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment