摘要:
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 阅读全文
摘要:
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, 阅读全文
摘要:
Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文
摘要:
Write a function to find the longest common prefix string amongst an array of strings. 思路: 逐个遍历 第一趟: 第一个子串与第二个子串 求prefix。 备注。 prefix的最大长度等于两个子串中最短的字符串 阅读全文