码迷,mamicode.com
首页 >  
搜索关键字:smallest    ( 560个结果
PAT 1038 Recover the Smallest Number[dp][难]
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c ...
分类:其他好文   时间:2018-09-23 13:48:06    阅读次数:191
leetcode41 - First Missing Positive - hard
Given an unsorted integer array, find the smallest missing positive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Examp ...
分类:其他好文   时间:2018-09-16 12:23:58    阅读次数:137
PAT 1144 The Missing Number
Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains ...
分类:其他好文   时间:2018-09-15 22:07:00    阅读次数:220
lc 632. Smallest Range
https://leetcode.com/problems/smallest-range/description/ 给你k个数组,找一个最小区间[a,b],可以包含k个数组中的数字各至少一个。 滑动窗口题。 对于要求“最短”的题目很适用。 points: 1.在扩张右界的时候,一旦碰到合法就停止,但 ...
分类:其他好文   时间:2018-09-13 14:25:14    阅读次数:155
选择排序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
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
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
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
556. Next Greater Element III下一个更大的数字
[抄题]: Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and ...
分类:其他好文   时间:2018-08-21 22:40:44    阅读次数:313
560条   上一页 1 ... 11 12 13 14 15 ... 56 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!