摘要:
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl 阅读全文
posted @ 2015-06-29 10:30
Grandyang
阅读(25620)
评论(5)
推荐(2)
摘要:
Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input: head = [1,2,3,4,5], n = 2 Output: 阅读全文
posted @ 2015-06-29 10:28
Grandyang
阅读(20740)
评论(15)
推荐(0)
摘要:
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa 阅读全文
posted @ 2015-06-29 09:52
Grandyang
阅读(25990)
评论(11)
推荐(0)
摘要:
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
posted @ 2015-06-29 08:59
Grandyang
阅读(40541)
评论(14)
推荐(1)
摘要:
Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return 阅读全文
posted @ 2015-06-29 08:54
Grandyang
阅读(15688)
评论(0)
推荐(0)
摘要:
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Exampl 阅读全文
posted @ 2015-06-29 08:51
Grandyang
阅读(21911)
评论(2)
推荐(0)
摘要:
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C 阅读全文
posted @ 2015-06-29 08:14
Grandyang
阅读(24960)
评论(2)
推荐(2)

浙公网安备 33010602011771号