
1 stackpop 2015-06-11 10:00:30 +08:00 以前做过 https://github.com/sjtubinlong/Programming-Challenges/tree/master/leetcode 你看看 Search_in_Rotated_Sorted_Array Search_in_Rotated_Sorted_Array_II 两道题 |
2 n0o0a0h0 2015-06-11 10:01:14 +08:00 不懂swift啊 如果是C++ 就将数组和下标存在map或者是unordered_map(后面查找速度快很多)。很简单的。 |
3 stackpop 2015-06-11 10:02:08 +08:00 最坏是 O(N), 平均是 O(lgN) |
8 aheadlead 2015-06-11 10:53:32 +08:00 二分断点 |
9 liuchang0812 2015-06-11 11:02:41 +08:00 leetcode 原题 |
10 Golevka 2015-06-11 11:07:23 +08:00 这种东西就是需要判断的case多一点而已, 写出空间O(1)时间O(logN)的应该没什么难度 P.S. 我们在leetcode上都是20行以内A过的不明白你为什么洋洋洒洒写了这么多. |
11 momo1999 2015-06-11 11:21:59 +08:00 一个二分真的需要写这么多吗 |
12 GtDzx 2015-06-11 11:27:24 +08:00 楼主申请的哪家公司啊? 还有远程机试。 |
13 caoyue 2015-06-11 18:26:58 +08:00 看来刷刷 LeetCode 还是有用的=-= |