上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2017-12-20 04:48 逸朵 阅读(178) 评论(0) 推荐(0)
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2017-12-20 04:33 逸朵 阅读(136) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2017-12-20 03:49 逸朵 阅读(194) 评论(0) 推荐(0)
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2017-12-20 03:23 逸朵 阅读(316) 评论(0) 推荐(0)
摘要: Given a string s, return all the palindromic permutations (without duplicates) of it. Return an empty list if no palindromic permutation could be form 阅读全文
posted @ 2017-12-20 03:07 逸朵 阅读(285) 评论(0) 推荐(0)
摘要: There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo 阅读全文
posted @ 2017-12-20 01:51 逸朵 阅读(115) 评论(0) 推荐(0)
摘要: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak 阅读全文
posted @ 2017-12-19 09:06 逸朵 阅读(401) 评论(0) 推荐(0)
摘要: Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + 阅读全文
posted @ 2017-12-19 07:20 逸朵 阅读(140) 评论(0) 推荐(0)
摘要: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文
posted @ 2017-12-19 06:54 逸朵 阅读(145) 评论(0) 推荐(0)
摘要: Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq 阅读全文
posted @ 2017-12-19 06:34 逸朵 阅读(172) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页