上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 * M). More formally check if th 阅读全文
posted @ 2020-07-14 22:16 whatyouthink 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num 阅读全文
posted @ 2020-07-14 22:12 whatyouthink 阅读(76) 评论(0) 推荐(0) 编辑
摘要: Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the 阅读全文
posted @ 2020-07-14 22:03 whatyouthink 阅读(87) 评论(0) 推荐(0) 编辑
摘要: In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as 阅读全文
posted @ 2020-07-14 21:58 whatyouthink 阅读(100) 评论(0) 推荐(0) 编辑
摘要: In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty. There is at least one empty seat, and at least 阅读全文
posted @ 2020-07-14 21:51 whatyouthink 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2020-07-14 21:26 whatyouthink 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most signific 阅读全文
posted @ 2020-07-14 21:21 whatyouthink 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2020-07-14 00:13 whatyouthink 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - that 阅读全文
posted @ 2020-07-13 23:35 whatyouthink 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). 找最长连续上升子序列 class Solution(object): def f 阅读全文
posted @ 2020-07-13 23:30 whatyouthink 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页