摘要: 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 阅读(140) 评论(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) 编辑
摘要: 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) 编辑