-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
984d7dc
commit 4caac1d
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import UIKit | ||
|
||
// 题目:寻找两个有序数组的中位数 | ||
|
||
// 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 | ||
// 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 | ||
// 你可以假设 nums1 和 nums2 不会同时为空。 | ||
|
||
// 示例 1: | ||
// nums1 = [1, 3] | ||
// nums2 = [2] | ||
// 则中位数是 2.0 | ||
|
||
// 示例 2: | ||
// nums1 = [1, 2] | ||
// nums2 = [3, 4] | ||
// 则中位数是 (2 + 3)/2 = 2.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<playground version='5.0' target-platform='ios' executeOnSourceChanges='false'> | ||
<timeline fileName='timeline.xctimeline'/> | ||
</playground> |