摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2017-02-08 22:26 notesbuddy 阅读(171) 评论(0) 推荐(0) 编辑
摘要: String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, 阅读全文
posted @ 2017-02-08 14:16 notesbuddy 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文
posted @ 2017-02-08 11:00 notesbuddy 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 思路: 逐个遍历 第一趟: 第一个子串与第二个子串 求prefix。 备注。 prefix的最大长度等于两个子串中最短的字符串 阅读全文
posted @ 2017-02-08 10:44 notesbuddy 阅读(117) 评论(0) 推荐(0) 编辑