上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: In a deck of cards, each card has an integer written on it. Return true if and only if you can choose X >= 2 such that it is possible to split the ent 阅读全文
posted @ 2020-07-15 21:43 whatyouthink 阅读(127) 评论(0) 推荐(0) 编辑
摘要: A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum. Gi 阅读全文
posted @ 2020-07-15 21:23 whatyouthink 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product. 给一个数组,找出三个数,使得他们的乘积最大。 分类讨论 max1 max2 max3 min1 mi 阅读全文
posted @ 2020-07-15 21:05 whatyouthink 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non 阅读全文
posted @ 2020-07-14 23:28 whatyouthink 阅读(108) 评论(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 @ 2020-07-14 23:17 whatyouthink 阅读(104) 评论(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 @ 2020-07-14 23:05 whatyouthink 阅读(92) 评论(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 @ 2020-07-14 22:56 whatyouthink 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given an array A of integers, return true if and only if it is a valid mountain array. Recall that A is a mountain array if and only if: A.length >= 3 阅读全文
posted @ 2020-07-14 22:46 whatyouthink 阅读(72) 评论(0) 推荐(0) 编辑
摘要: We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). N 阅读全文
posted @ 2020-07-14 22:33 whatyouthink 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  阅读全文
posted @ 2020-07-14 22:21 whatyouthink 阅读(72) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页