摘要:
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-10-26 19:51
bernieloveslife
阅读(149)
评论(0)
推荐(0)
摘要:
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2017-10-26 18:36
bernieloveslife
阅读(106)
评论(0)
推荐(0)
摘要:
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be 阅读全文
posted @ 2017-10-26 18:31
bernieloveslife
阅读(110)
评论(0)
推荐(0)
摘要:
Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they 阅读全文
posted @ 2017-10-26 15:32
bernieloveslife
阅读(137)
评论(0)
推荐(0)
摘要:
Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 阅读全文
posted @ 2017-10-26 15:13
bernieloveslife
阅读(123)
评论(0)
推荐(0)

浙公网安备 33010602011771号