array
文章平均质量分 81
leetcode array
qq184861643
这个作者很懒,什么都没留下…
展开
-
leetcode: Max Chunks To Make Sorted II
QuestionGiven an array arr of integers (not necessarily distinct), we split the array into some number of “chunks” (partitions), and individually sort each chunk. After concatenating them, the resu原创 2018-01-29 18:51:25 · 196 阅读 · 0 评论 -
leetcode: My Calender I
QuestionImplement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking.Your class will have the method, book(intstart,intend)book(i...原创 2018-02-07 22:21:15 · 194 阅读 · 0 评论 -
leetcode: Subarray Sums Divisible by K
ProblemGiven an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K.Example 1:Input: A = [4,5,0,-2,-3,1], K = 5Output: 7Explanation: There a...原创 2019-02-22 22:33:19 · 127 阅读 · 0 评论 -
leetcode: Maximum Width Ramp
ProblemGiven an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of such a ramp is j - i.Find the maximum width of a ramp in A. If one doesn’t exist,...原创 2019-02-24 17:44:52 · 115 阅读 · 0 评论