leetcode归并排序
文章平均质量分 50
Bryan要加油
这个作者很懒,什么都没留下…
展开
-
264. Ugly Number II(Leetcode每日一题-2021.04.11)--抄答案
Problem Given an integer n, return the nth ugly number. Ugly number is a positive number whose prime factors only include 2, 3, and/or 5. Constraints: 1 <= n <= 1690 Example1 Input: n = 10 Output: 12 Explanation: [1, 2, 3, 4, 5, 6, 8, 9, 10, 12] i原创 2021-04-11 21:36:45 · 392 阅读 · 0 评论 -
493. Reverse Pairs(Leetcode每日一题-2020.11.28)
Problem Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j]. You need to return the number of important reverse pairs in the given array. Example1 Input: [1,3,2,3,1] Output: 2 Example2 Input: [2,4,3,5,1]原创 2020-11-28 20:44:59 · 173 阅读 · 0 评论 -
315. Count of Smaller Numbers After Self(Leetcode每日一题-2020.07.11)
Problem You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example Input: [5,2,6,1] Output: [2,1,1,0] Explanation: To原创 2020-07-12 10:13:12 · 242 阅读 · 0 评论 -
23. Merge k Sorted Lists(Leetcode每日一题-2020.04.26)
Problem Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4-&...原创 2020-04-26 09:03:19 · 251 阅读 · 0 评论 -
面试题51. 数组中的逆序对(Leetcode每日一题-2020.04.24)
占坑 归并排序原创 2020-04-24 21:14:29 · 280 阅读 · 0 评论