912.sort-an-array.pdf
58.9 KB
leetcode.com 2023-03-01
🟡912.sort-an-array
🏷️ Tags
#array #divide_and_conquer #sorting #heap_priority_queue #merge_sort #bucket_sort #radix_sort #counting_sort
🟡912.sort-an-array
🏷️ Tags
#array #divide_and_conquer #sorting #heap_priority_queue #merge_sort #bucket_sort #radix_sort #counting_sort
23.merge-k-sorted-lists.pdf
66.1 KB
leetcode.com 2023-03-12
🔴23.merge-k-sorted-lists
🏷️ Tags
#linked_list #divide_and_conquer #heap_priority_queue #merge_sort
🔴23.merge-k-sorted-lists
🏷️ Tags
#linked_list #divide_and_conquer #heap_priority_queue #merge_sort
leetcode.cn 2023-08-12
🔴23.merge-k-sorted-lists
🏷️ Tags
#linked_list #divide_and_conquer #heap_priority_queue #merge_sort
🔴23.merge-k-sorted-lists
🏷️ Tags
#linked_list #divide_and_conquer #heap_priority_queue #merge_sort
Telegraph
merge-k-sorted-lists
给你一个链表数组,每个链表都已经按升序排列。 请你将所有链表合并到一个升序链表中,返回合并后的链表。 示例 1: 输入:lists = [[1,4,5],[1,3,4],[2,6]] 输出:[1,1,2,3,4,4,5,6] 解释:链表数组如下: [ 1->4->5, 1->3->4, 2->6 ] 将它们合并到一个有序链表中得到。 1->1->2->3->4->4->5->6 示例 2: 输入:lists = [] 输出:[] 示例 3: 输入:lists = [[]] 输出:[] 提示:
leetcode.cn 2025-04-15
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
Telegraph
count-good-triplets-in-an-array
给你两个下标从 0 开始且长度为 n 的整数数组 nums1 和 nums2 ,两者都是 [0, 1, ..., n - 1] 的 排列 。 好三元组 指的是 3 个 互不相同 的值,且它们在数组 nums1 和 nums2 中出现顺序保持一致。换句话说,如果我们将 pos1v 记为值 v 在 nums1 中出现的位置,pos2v 为值 v 在 nums2 中的位置,那么一个好三元组定义为 0 <= x, y, z <= n - 1 ,且 pos1x < pos1y < pos1z 和 pos2x < pos2y…
leetcode.com 2025-04-15
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
🔴2179.count-good-triplets-in-an-array
🏷️ Tags
#binary_indexed_tree #segment_tree #array #binary_search #divide_and_conquer #ordered_set #merge_sort
Telegraph
count-good-triplets-in-an-array
You are given two 0-indexed arrays nums1 and nums2 of length n, both of which are permutations of [0, 1, ..., n - 1]. A good triplet is a set of 3 distinct values which are present in increasing order by position both in nums1 and nums2. In other words, if…
👍1