摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2016-09-03 13:19 LiBlog 阅读(152) 评论(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 @ 2016-09-03 07:58 LiBlog 阅读(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 @ 2016-09-03 07:27 LiBlog 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2016-09-03 06:29 LiBlog 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2016-09-03 05:42 LiBlog 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文
posted @ 2016-09-03 05:27 LiBlog 阅读(220) 评论(0) 推荐(0) 编辑