码迷,mamicode.com
首页 >  
搜索关键字:smallest sub-array    ( 590个结果
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 ...
分类:其他好文   时间:2017-10-25 18:14:25    阅读次数:170
402. Remove K Digits
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 ...
分类:其他好文   时间:2017-10-25 00:34:36    阅读次数:151
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 ...
分类:其他好文   时间:2017-10-24 16:07:33    阅读次数:100
[LeetCode] Delete Duplicate Emails
Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. For example, aft ...
分类:其他好文   时间:2017-10-24 13:18:46    阅读次数:148
LeetCode 411: Minimum Unique Word Abbreviation
Note: This solution is combined with Trie + Generialized Abbreviation: 1. Since it looks for smallest one, we need persist a string to find minimum le ...
分类:其他好文   时间:2017-10-13 17:54:11    阅读次数:144
LeetCode 4. Median of Two Sorted Arrays (分治)
两个有序的数组 nums1 和 nums2 维数分别为m,n。找所有数的中位数,复杂度 O(log (m+n)) 注意:奇偶个数,分治法求解,递归出口特殊处理。取Kth smallest数时,分治取mid=k/2和k-mid,避免奇数造成影响。 ...
分类:其他好文   时间:2017-10-09 19:34:58    阅读次数:147
LeetCode 378: Kth Smallest Element in Sorted Matrix
1. Use priority queue. Need to check whether one element has been double counted: 2 Binary search: For this kind of matrix, binary search should work ...
分类:其他好文   时间:2017-10-09 14:09:28    阅读次数:126
2017青岛赛区网络赛 Smallest Minimum Cut 求最小割的最小割边数
先最大流跑一遍 在残存网络上把满流边容量+1 非满流边容量设为无穷大 在进行一次最大流即可 (这里的边都不包括建图时用于反悔的反向边) ...
分类:其他好文   时间:2017-10-01 23:44:32    阅读次数:237
HDU6214 Smallest Minimum Cut
题目链接:HDU6214 留一个链式前向星+Dinic模板(希望不要被某人发现,嘿嘿嘿)。 ...
分类:其他好文   时间:2017-09-26 19:43:33    阅读次数:181
数列极差问题(the problem of sequence biggest difference)
#include <iostream>#include <string>#include <list> //we use the list container , because it is easy to sort and get the biggest number and smallest n ...
分类:其他好文   时间:2017-09-22 19:13:30    阅读次数:122
590条   上一页 1 ... 19 20 21 22 23 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!