Unverified Commit 06076dec authored by 程序员吴师兄's avatar 程序员吴师兄 Committed by GitHub
Browse files

Merge pull request #130 from jesee030/fix_spell

Update 0004-median-of-two-sorted-arrays.md
parents 57340038 691a4e51
...@@ -42,7 +42,7 @@ nums2 = [3, 4] ...@@ -42,7 +42,7 @@ nums2 = [3, 4]
![](../Animation/image2.PNG) ![](../Animation/image2.PNG)
如图,我们要找到一组A,B,满足上面3条规则。 如图,我们要找到一组A,B,满足上面3条规则。
对于规则1,我们在数组1中找任意A,然后根据规则1就能推算出对应的B的位置。 对于规则1,我们在数组1中找任意A,然后根据规则1就能推算出对应的B的位置。
对于规则2,由于数组1和2都是有序数组,即X1<A<Y1;X2<B<Y2。我们实际上只需要判断A是否小于Y2,以及B是否小于Y2 对于规则2,由于数组1和2都是有序数组,即X1<A<Y1;X2<B<Y2。我们实际上只需要判断A是否小于Y2,以及B是否小于Y1
对于规则3,由于数组1和2都是有序数组,因此中位数为A,B中较大的那一项。 对于规则3,由于数组1和2都是有序数组,因此中位数为A,B中较大的那一项。
那么具体该如何操作呢? 那么具体该如何操作呢?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment