摘要:
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-15 09:44
daniel456
阅读(165)
评论(0)
推荐(0)
摘要:
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2017-10-15 09:35
daniel456
阅读(138)
评论(0)
推荐(0)
摘要:
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-10-15 09:03
daniel456
阅读(154)
评论(0)
推荐(0)
摘要:
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
posted @ 2017-10-15 08:58
daniel456
阅读(139)
评论(0)
推荐(0)
摘要:
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2017-10-15 08:50
daniel456
阅读(163)
评论(0)
推荐(0)
摘要:
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [0, 1, 阅读全文
posted @ 2017-10-15 08:41
daniel456
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号