码迷,mamicode.com
首页 >  
搜索关键字:smallest    ( 560个结果
113th LeetCode Weekly Contest Largest Time for Given Digits
Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting f ...
分类:其他好文   时间:2018-12-02 22:49:46    阅读次数:185
Weekly Contest 113
949. Largest Time for Given Digits (string::compare) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hou ...
分类:其他好文   时间:2018-12-02 13:38:24    阅读次数:120
402. Remove K Digits - Medium
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l ...
分类:其他好文   时间:2018-11-29 15:01:13    阅读次数:143
LeetCode 302. Smallest Rectangle Enclosing Black Pixels
DFS 最一开始想到的就是dfs,从题目给的点开始dfs搜索。 时间复杂度为O(mn) Binary Search 这道题给了一个坐标(x,y),其实是有用意的。如果只是单纯的搜索,我们完全可以搜索整个图。 这道题其实可以用二分来做。由于给定的点是黑的,我们可以从水平和竖直两个方向,分别找到由黑变白 ...
分类:其他好文   时间:2018-11-12 11:39:22    阅读次数:234
786. K-th Smallest Prime Fraction
A sorted list A contains 1, plus some number of primes. Then, for every p < q in the list, we consider the fraction p/q. What is the K-th smallest fra ...
分类:其他好文   时间:2018-11-09 20:52:52    阅读次数:296
719. Find K-th Smallest Pair Distance
Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pair (A, B) is defined as the absolute difference bet ...
分类:其他好文   时间:2018-11-08 22:09:02    阅读次数:142
373 Find K Pairs with Smallest Sums
https://leetcode.com/problems/find-k-pairs-with-smallest-sums/discuss/84551/simple-Java-O(KlogK)-solution-with-explanation public class Solution { pub... ...
分类:其他好文   时间:2018-11-08 18:15:10    阅读次数:135
373. Find K Pairs with Smallest Sums
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th... ...
分类:其他好文   时间:2018-11-06 11:22:59    阅读次数:191
378. Kth Smallest Element in a Sorted Matrix
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th... ...
分类:其他好文   时间:2018-11-06 11:16:38    阅读次数:156
668. Kth Smallest Number in Multiplication Table
Nearly every one have used the Multiplication Table. But could you find out the k-th smallest number quickly from the multiplication table? Given the ... ...
分类:其他好文   时间:2018-11-06 11:09:22    阅读次数:109
560条   上一页 1 ... 9 10 11 12 13 ... 56 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!