码迷,mamicode.com
首页 >  
搜索关键字:smallest difference    ( 1670个结果
lc 632. Smallest Range
https://leetcode.com/problems/smallest-range/description/ 给你k个数组,找一个最小区间[a,b],可以包含k个数组中的数字各至少一个。 滑动窗口题。 对于要求“最短”的题目很适用。 points: 1.在扩张右界的时候,一旦碰到合法就停止,但 ...
分类:其他好文   时间:2018-09-13 14:25:14    阅读次数:155
LL&LR parser
https://stackoverflow.com/questions/5975741/what-is-the-difference-between-ll-and-lr-parsing http://blog.reverberate.org/2013/07/ll-and-lr-parsing-dem ...
分类:其他好文   时间:2018-09-11 18:03:28    阅读次数:143
选择排序python实现
def findsmallest(arr): smallest=arr[0] smallest_index=0 for i in range(1,len(arr)): #smallest_index+=1 if arr[i]<=smallest: smallest=arr[i] smallest_i ...
分类:编程语言   时间:2018-09-09 20:32:16    阅读次数:208
set集合的常用方法
set集合是一种无序不重复的集合 add (self, *args, **kwargs) 添加元素 clear (self, *args, **kwargs) 清空内容 update (self, *args, **kwargs) 可添加多个元素,更新 difference (self, *args ...
分类:其他好文   时间:2018-09-09 19:50:48    阅读次数:332
230. Kth Smallest Element in a BST
身体不好 ...
分类:其他好文   时间:2018-09-02 11:31:55    阅读次数:173
武大OJ 574. K-th smallest
Description Give you a number S of length n,you can choose a position and remove the number on it.After that,you will get a new number. More formally, ...
分类:其他好文   时间:2018-09-01 20:23:35    阅读次数:143
1088 Rational Arithmetic(20 分)
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp ...
分类:其他好文   时间:2018-08-31 17:09:12    阅读次数:191
Leetcode 230. Kth Smallest Element in a BST
题目链接 https://leetcode.com/problems/kth smallest element in a bst/description/ 题目描述 Given a binary search tree, write a function kthSmallest to find th ...
分类:其他好文   时间:2018-08-28 14:26:01    阅读次数:154
[bzoj2213][Poi2011]Difference_动态规划
Difference bzoj-2213 Poi-2011 题目大意:已知一个长度为n的由小写字母组成的字符串,求其中连续的一段,满足该段中出现最多的字母出现的个数减去该段中出现最少的字母出现的个数最大。求这个个数。 注释:$1\le n\le 10^6$。 想法:“在线”的dp题。 状态:$dp[ ...
分类:其他好文   时间:2018-08-26 14:45:44    阅读次数:112
373. Find K Pairs with Smallest Sums 找出求和和最小的k组数
[抄题]: 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 f ...
分类:其他好文   时间:2018-08-24 10:48:20    阅读次数:194
1670条   上一页 1 ... 34 35 36 37 38 ... 167 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!