码迷,mamicode.com
首页 >  
搜索关键字:sort 全排列    ( 14268个结果
15. 三数之和
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { int n=nums.size(); vector<vector<int>>ans; if(n<3) return{}; sort(nums.begi ...
分类:其他好文   时间:2021-02-08 11:52:34    阅读次数:0
字母大小全排列
784.字母大小全排列 给定一个字符串S,通过将字符串S中的每个字母转变大小写,我们可以获得一个新的字符串。返回所有可能得到的字符串集合。 示例: 输入:S = "a1b2" 输出:["a1b2", "a1B2", "A1b2", "A1B2"] 输入:S = "3z4" 输出:["3z4", "3 ...
分类:其他好文   时间:2021-02-01 12:41:42    阅读次数:0
a_lc_缺失的第一个整数(暴力 / 不断放到正确位置)
给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。O(n)+O(1) 排序 func firstMissingPositive(A []int) int { n := len(A) sort.Ints(A) for i := 1; i <= n; i++ { idx := s ...
分类:其他好文   时间:2021-02-01 12:16:54    阅读次数:0
linux 下 取进程占用内存(MEM)最高的前10个进程
# linux 下 取进程占用 cpu 最高的前10个进程ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head # linux 下 取进程占用内存(MEM)最高的前10个进程ps aux|head -1;ps aux|grep -v PID|so ...
分类:系统相关   时间:2021-01-30 11:52:19    阅读次数:0
Python checklist
数据结构 字典 list.append NodeList定义和操作 递归 操作 enumerate zip divmod,// (x if a else y) string = list lis.sort int(str(x)[::-1]) 去空格:str.strip() ...
分类:编程语言   时间:2021-01-27 13:13:12    阅读次数:0
Easy | LeetCode 581. 最短无序连续子数组 | 排序 | 单调栈 | 局部单调性
581. 最短无序连续子数组 给你一个整数数组 nums ,你需要找出一个 连续子数组 ,如果对这个子数组进行升序排序,那么整个数组都会变为升序排序。 请你找出符合题意的 最短 子数组,并输出它的长度。 示例 1: 输入:nums = [2,6,4,8,10,9,15] 输出:5 解释:你只需要对 ...
分类:编程语言   时间:2021-01-27 13:10:56    阅读次数:0
URI Search
基本查询,q表示关键字,df为不指定字段的默认字段,sort时间排序,from和size表示分页和每页大小,timeout为超时时间 GET /movies/_search?q=2012&df=title&sort=year:desc&from=0&size=10&timeout=1s 带profi ...
分类:其他好文   时间:2021-01-27 13:06:43    阅读次数:0
1329. Sort the Matrix Diagonally (M)
Sort the Matrix Diagonally (M) 题目 A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column a ...
分类:其他好文   时间:2021-01-25 11:27:14    阅读次数:0
当前栏目Tag
{eyou:tag getall='1' row='50' sort='hot'} <a href='{$field.link}'>{$field.tag}</a> {/eyou:tag} getall='' 获取类型,0为当前内容页TAG标记,1为获取全部TAG标记 sort='' 标签排序方式 ...
分类:其他好文   时间:2021-01-25 11:16:55    阅读次数:0
文档调用Tag及阅读数
{eyou:list} 标题:{$field.title} 阅读数:{$field.click} 标签:{eyou:tag sort='now' getall='0' row='10' id='field2'} <a href='{$field2.link}' class="tag">{$field ...
分类:其他好文   时间:2021-01-25 11:16:20    阅读次数:0
14268条   上一页 1 ... 13 14 15 16 17 ... 1427 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!