码迷,mamicode.com
首页 >  
搜索关键字:bubble sort    ( 13252个结果
最小生成树 : 最大边
https://www.acwing.com/problem/content/1144/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-17 14:57:50    阅读次数:0
LeetCode - Merge Intervals
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals ...
分类:其他好文   时间:2021-02-16 12:04:54    阅读次数:0
1069 The Black Hole of Numbers (20 分)
注意不满$4$位的话要补成$4$位。 string s; set<int> S; int main() { cin>>s; while(s.size()<4) s='0'+s; while(true) { sort(s.begin(),s.end(),greater<char>()); string ...
分类:其他好文   时间:2021-02-15 12:21:49    阅读次数:0
排序算法介绍和分类
排序算法的介绍 排序也称排序算法(Sort Algorithm),排序是将一组数据,依指定的顺序进行排列的过程。 排序的分类: 1) 内部排序: 指将需要处理的所有数据都加载到内部存储器(内存)中进行排序。 2) 外部排序法: 数据量过大,无法全部加载到内存中,需要借助外部存储(文件等)进行排序。 ...
分类:编程语言   时间:2021-02-15 12:19:55    阅读次数:0
表连接方法
Oracle表连接方法有四种: 排序合并连接(Sort Merge Join) 嵌套循环连接(Nested Loops Join) 哈希连接(Hash Join) 笛卡尔积(Cartesian Product) 排序合并连接(Sort Merge Join) 排序合并连接是将连接的两个表使用连接列排 ...
分类:其他好文   时间:2021-02-09 12:42:10    阅读次数:0
C# list sort底层原理
如果提供比较,则使用委托表示的方法对列表中的元素进行排序。如果comparison为null,则抛出ArgumentNullException。 此方法使用数组.排序,其应用自省排序,如下所示: 如果分区大小小于或等于16个元素,则使用插入排序算法 如果分区数超过2logn,其中n是输入数组的范围, ...
分类:Windows程序   时间:2021-02-08 12:14:42    阅读次数:0
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
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
13252条   上一页 1 ... 12 13 14 15 16 ... 1326 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!