摘要: Given an array of integers and an integerk, find out whether there there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the d... 阅读全文
posted @ 2015-08-06 23:08 ~每天进步一点点~ 阅读(114) 评论(0) 推荐(0) 编辑
摘要: A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you aregiven... 阅读全文
posted @ 2015-08-06 22:57 ~每天进步一点点~ 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-08-06 22:12 ~每天进步一点点~ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Find all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a u... 阅读全文
posted @ 2015-08-06 21:17 ~每天进步一点点~ 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
posted @ 2015-08-06 21:04 ~每天进步一点点~ 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f... 阅读全文
posted @ 2015-08-06 20:58 ~每天进步一点点~ 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Note:This is an extension ofHouse Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that h... 阅读全文
posted @ 2015-08-06 19:58 ~每天进步一点点~ 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjac... 阅读全文
posted @ 2015-08-06 10:42 ~每天进步一点点~ 阅读(105) 评论(0) 推荐(0) 编辑