上一页 1 2 3 4 5 6 7 8 ··· 41 下一页
摘要: 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 @ 2017-03-25 13:13 Deribs4 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and 阅读全文
posted @ 2017-03-24 14:22 Deribs4 阅读(667) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Note: There are at 阅读全文
posted @ 2017-03-23 23:06 Deribs4 阅读(444) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte 阅读全文
posted @ 2017-03-23 16:40 Deribs4 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2017-03-22 21:51 Deribs4 阅读(172) 评论(0) 推荐(0) 编辑
摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequence 阅读全文
posted @ 2017-03-22 21:51 Deribs4 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to 阅读全文
posted @ 2017-03-22 21:50 Deribs4 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2017-03-20 20:03 Deribs4 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-03-20 15:48 Deribs4 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 参考:http://www.cnblogs.com/huashiyiqike/p/3568922.html 阅读全文
posted @ 2017-02-05 10:17 Deribs4 阅读(457) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 41 下一页