码迷,mamicode.com
首页 >  
搜索关键字:smallest    ( 560个结果
LeetCode 744. Find Smallest Letter Greater Than Target (时间复杂度O(n))
题目 太简单了,直接上代码: ...
分类:其他好文   时间:2017-12-18 01:12:53    阅读次数:103
find second maximum element in Binary search tree
一个BST, 问怎么找到第二大的节点。首先说了个naive的方法,serialize, 他问有没有更有效的方法。最后用的iterative的方法向右遍历子节点 log(n) 或者inorder, O(n): 230. Kth Smallest Element in a BST ...
分类:其他好文   时间:2017-12-14 03:46:57    阅读次数:113
[LeetCode] Find Smallest Letter Greater Than Target
Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t ...
分类:其他好文   时间:2017-12-12 15:16:44    阅读次数:152
744. Find Smallest Letter Greater Than Target 找到大于目标的最小的字母
Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t... ...
分类:其他好文   时间:2017-12-12 00:20:22    阅读次数:190
python文本处理练习-3
"计算数组中最小的两个数的和" #!usr/bin/python3 #-*- coding:utf-8 -*- numbers=np.array((4,3,7,5,6)) def sum_two_smallest_numbers(numbers): numbers.sort() return num... ...
分类:编程语言   时间:2017-12-11 16:14:42    阅读次数:123
LeetCode 483. Smallest Good Base
题目描述: LeetCode 483. Smallest Good Base For an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. Now given a string representi ...
分类:其他好文   时间:2017-12-03 17:17:25    阅读次数:365
Leetcode 230: Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:其他好文   时间:2017-12-03 11:41:35    阅读次数:159
Sorting It All Out(拓扑排序)
题目: An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to l ...
分类:编程语言   时间:2017-12-02 16:22:40    阅读次数:157
302. Smallest Rectangle Enclosing Black Pixels
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 ...
分类:其他好文   时间:2017-11-26 16:00:31    阅读次数:172
UVA - 11997:K Smallest Sums
多路归并 ...
分类:其他好文   时间:2017-11-25 13:02:27    阅读次数:87
560条   上一页 1 ... 17 18 19 20 21 ... 56 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!