Description You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists ...
分类:
其他好文 时间:
2020-07-19 15:47:40
阅读次数:
73
(贪心、字符串) ##题目大意 给一些字符串,求它们拼接起来构成最小数字的方式 ##思路 贪心算法。用cmp排序,直接判断a+b和b+a的大小即可。 必须保证两个字符串构成的数字是最小的才行,所以cmp函数写成return a + b < b + a;的形式,保证它排列按照能够组成的最小数字的形式排 ...
分类:
其他好文 时间:
2020-07-13 14:04:47
阅读次数:
60
转自:Django模型中的OneToOneField和ForeignKey有什么区别? 在stackoverflow发了个帖子问这个问题(http://stackoverflow.com/questions/5870537/whats-the-difference-between-django-on ...
分类:
Web程序 时间:
2020-07-12 16:47:52
阅读次数:
51
Difference between Dangling Pointer and Wild Pointer? A dangling pointer is a pointer that used to point to a valid address but now no longer does. Th ...
分类:
其他好文 时间:
2020-07-12 01:03:42
阅读次数:
90
Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a. If there is no answer or the answer i ...
分类:
其他好文 时间:
2020-07-10 09:57:57
阅读次数:
79
Maximum Gap Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains le ...
分类:
其他好文 时间:
2020-07-08 15:25:35
阅读次数:
52
待整理https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix/solution/you-xu-ju-zhen-zhong-di-kxiao-de-yuan-su-by-leetco/ ...
分类:
其他好文 时间:
2020-07-07 17:56:02
阅读次数:
62
378. 有序矩阵中第K小的元素 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix 题目 给定一个 n x n 矩阵,其中每行和每列元素均按升序排序,找到矩阵中第 k 小 ...
分类:
编程语言 时间:
2020-07-02 21:29:52
阅读次数:
54
1. Your goal in this kata is to implement a difference function, which subtracts one list from another and returns the result. It should remove all va ...
分类:
其他好文 时间:
2020-06-28 09:41:17
阅读次数:
75
What is the difference between V-belts and flat belts? 1、平带 flat-belt In comparison to V-belts, flat belts require significantly higher pretensioning ...
分类:
其他好文 时间:
2020-06-27 20:17:41
阅读次数:
146