码迷,mamicode.com
首页 >  
搜索关键字:smallest sub-array    ( 590个结果
Leetcode 41. First Missing Positive
41. First Missing Positive 题目链接:https://leetcode.com/problems/first-missing-positive/ Description: Given an unsorted integer array, find the smallest ...
分类:其他好文   时间:2019-01-05 21:30:55    阅读次数:200
TOJ 4244 Sum(单调栈区间极差)
描述 Given a sequence, we define the seqence's value equals the difference between the largest element and the smallest element in the sequence. As an e ...
分类:其他好文   时间:2018-12-30 17:34:19    阅读次数:213
To the Max POJ - 1050
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the ...
分类:其他好文   时间:2018-12-21 21:23:48    阅读次数:292
LC 302. Smallest Rectangle Enclosing Black Pixels【lock, hard】
An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one bla ...
分类:其他好文   时间:2018-12-21 21:17:29    阅读次数:240
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
590条   上一页 1 ... 9 10 11 12 13 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!