摘要: Given an array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of the set 阅读全文
posted @ 2020-07-22 17:26 whatyouthink 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2020-07-22 14:28 whatyouthink 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers arr and two integers k and threshold. Return the number of sub-arrays of size k and average greater than or equal to thresh 阅读全文
posted @ 2020-07-22 13:59 whatyouthink 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of 0s and 1s and an integer k, return True if all 1's are at least k places away from each other, otherwise return False. 给一个数组,里面 阅读全文
posted @ 2020-07-22 13:43 whatyouthink 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2020-07-22 13:21 whatyouthink 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Given the number k, return the minimum number of Fibonacci numbers whose sum is equal to k, whether a Fibonacci number could be used multiple times. T 阅读全文
posted @ 2020-07-22 13:01 whatyouthink 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given a list of folders, remove all sub-folders in those folders and return in any order the folders after removing. If a folder[i] is located within  阅读全文
posted @ 2020-07-22 11:58 whatyouthink 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2020-07-22 11:52 whatyouthink 阅读(72) 评论(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 @ 2020-07-15 22:32 whatyouthink 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given an array, rotate the array to the right by k steps, where k is non-negative. Follow up: Try to come up as many solutions as you can, there are a 阅读全文
posted @ 2020-07-15 22:00 whatyouthink 阅读(80) 评论(0) 推荐(0) 编辑