2019年4月8日

摘要: Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] 阅读全文
posted @ 2019-04-08 20:24 一直走在路上 阅读(95) 评论(0) 推荐(0)
摘要: Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may re 阅读全文
posted @ 2019-04-08 17:04 一直走在路上 阅读(100) 评论(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 @ 2019-04-08 05:08 一直走在路上 阅读(143) 评论(0) 推荐(0)
摘要: In a list of songs, the i-th song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration in seconds is 阅读全文
posted @ 2019-04-08 03:43 一直走在路上 阅读(284) 评论(0) 推荐(0)
摘要: Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algor 阅读全文
posted @ 2019-04-08 02:36 一直走在路上 阅读(158) 评论(0) 推荐(0)
摘要: Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko 阅读全文
posted @ 2019-04-08 00:06 一直走在路上 阅读(201) 评论(0) 推荐(0)

导航