码迷,mamicode.com
首页 >  
搜索关键字:kth largest    ( 1961个结果
链表中倒数第k个结点
题目:输入一个链表,输出该链表中倒数第k个结点。 这道题可以用快慢指针做,先让first指针走k步,然后first和second指针一起走,直到first指针走到空,这时候second指针就指向倒数第k个结点。 c++代码如下: ...
分类:其他好文   时间:2019-12-21 21:01:42    阅读次数:85
[LC] 152. Maximum Product Subarray
Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: I ...
分类:其他好文   时间:2019-12-17 13:19:28    阅读次数:82
英语单词vendors
vendors 来源——https://www.docker.com/products/docker-hub Share and Collaborate with Docker Hub Docker Hub is the world’s largest repository of container ...
分类:其他好文   时间:2019-12-13 13:58:37    阅读次数:73
英语单词independent
来源——https://www.docker.com/products/docker-hub 回到顶部 Share and Collaborate with Docker Hub Docker Hub is the world’s largest repository of container im ...
分类:其他好文   时间:2019-12-13 13:37:00    阅读次数:141
[LC] 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 ...
分类:其他好文   时间:2019-12-07 10:18:19    阅读次数:76
数组中的第K个最大元素
在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。 示例 1: 输入: [3,2,1,5,6,4] 和 k = 2输出: 5示例 2: 输入: [3,2,3,1,2,4,5,5,6] 和 k = 4输出: 4说明: 你可以假设 ...
分类:编程语言   时间:2019-11-29 11:05:35    阅读次数:69
Ftrace的部分使用方法
ftrace主要是用于调试linux kernel调度相关的一个工具,也可用于分析部分kernel性能问题。 相关ftrace的介绍可以参考:kernel/msm-4.9/Documentation/trace/ftrace.txt 以及同级目录下的其他介绍文件。 谷歌官网的ftrace使用教程(请 ...
分类:其他好文   时间:2019-11-22 19:47:18    阅读次数:84
跳表 SkipList
跳跃表实现简单,空间复杂度和时间复杂度也较好,Redis中使用跳表而不是红黑树。 实现参考了: "跳跃列表 维基百科,自由的百科全书" 《Redis设计与实现》第五章 跳跃表 Redis源码3.0分支src/t_zset.c等文件 插入时的核心逻辑: 1. 找到插入的位置 2. 随机得到新插入节点的 ...
分类:其他好文   时间:2019-11-20 16:54:47    阅读次数:71
221. Maximal Square
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: Input: 1 0 1 0 0 1 0 1 1 1 ...
分类:其他好文   时间:2019-11-20 12:37:11    阅读次数:65
[LC] 215. Kth Largest Element in an Array
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example ...
分类:其他好文   时间:2019-11-18 09:20:14    阅读次数:59
1961条   上一页 1 ... 14 15 16 17 18 ... 197 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!