上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 21 下一页
摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文
posted @ 2014-05-29 15:59 erictanghu 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t... 阅读全文
posted @ 2014-05-29 15:58 erictanghu 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2014-05-29 15:57 erictanghu 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl... 阅读全文
posted @ 2014-05-29 15:56 erictanghu 阅读(121) 评论(0) 推荐(0) 编辑
摘要: You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati... 阅读全文
posted @ 2014-05-29 15:55 erictanghu 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator.classSolution{public:intdivide(intdividend,intdivisor){longlonginta=divide... 阅读全文
posted @ 2014-05-29 15:54 erictanghu 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.classSolution{public:char*... 阅读全文
posted @ 2014-05-29 15:52 erictanghu 阅读(91) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2014-05-29 15:51 erictanghu 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
posted @ 2014-05-29 15:51 erictanghu 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文
posted @ 2014-05-29 15:50 erictanghu 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 21 下一页