码迷,mamicode.com
首页 >  
搜索关键字:radix sort    ( 13156个结果)
Radix Sort
To illustrate the radix sort algorithm we will sort the sequence S0 = {32, 100, 11, 554, 626, 122, 87, 963, 265, 108, 9}. We start by distributing ele ...
分类:其他好文   时间:2020-05-01 00:45:46    阅读次数:56
TXT文件的写入及读出
一、文件的读出: file = open('url/data.txt','r',encoding='utf-8')#打开模式r w a,当文件在当前工作区域直接写文件名;如果不在当前工作区域要写绝对地址 res = f.read()#读文件,获取文件里面的全部内容 res2 = f.readline ...
分类:其他好文   时间:2020-04-30 19:25:44    阅读次数:90
保留目录十个最新文件
#!/bin/bash Filelist=$(ls -l /data/backup/|egrep "^d"|awk '{print $9}') for i in $Filelist; do count=$(ls -l /data/backup/$i|grep -v total|wc -l) whil ...
分类:其他好文   时间:2020-04-30 19:00:59    阅读次数:69
算法 - 基数排序
要点:利用空间换时间,有桶排序的思想,按照基数规则转换,使空间开销较小,但理解起来比计数排序复杂的多。 1 import java.util.Random; 2 3 public class RadixSort { 4 5 public void sort(int arr[]) { 6 int ma ...
分类:编程语言   时间:2020-04-30 17:21:29    阅读次数:68
Linux 排序命令之 sort, wc, uniq
sort, wc, uniq 等命令组合使用,可以快速帮助我们进行排序。 1.sort sort命令可以用来排序,且可以根据不同的数据类型排序。(数字,文字) 排序字符也和编码有关,建议使用LANG=C来让语系统一。 (1)语法 sort [参数] [file or stdin] (2)参数 :忽略 ...
分类:编程语言   时间:2020-04-30 15:07:36    阅读次数:63
冒泡排序算法JAVA实现版
/***关于冒泡排序,从性能最低版本实现到性能最优版本实现*/public class BubbleSortDemo { public static void sort(int array[]) { for (int i = 0; i < array.length - 1; i++) { //通过前 ...
分类:编程语言   时间:2020-04-30 13:32:22    阅读次数:63
RxDB:indexedDB的踩坑之路
RxDB:indexedDB的踩坑之路 目前国内社区关于RxDB的资料较少,这篇文章是为了记录自己使用中遇到的一些问题解决总结,不会涉及到基本知识的科普,如果有同学有兴趣,再另外开一篇文章吧。 Schema中default生成器的实现 // 演示例子?,这是一个Schema的定义 const Sch ...
分类:数据库   时间:2020-04-30 11:18:28    阅读次数:64
581. Shortest Unsorted Continuous Subarray
Problem : Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole arra ...
分类:其他好文   时间:2020-04-29 23:08:17    阅读次数:65
常用的排序算法
https://github.com/hotwater99/practice_datastructure_and_algorithm.git《数据结构与算法分析——C语言描述》机械工业出版社,原书第2版,第7章N=100N=1000N=10000N=100000插入排序 insertion sort... ...
分类:编程语言   时间:2020-04-29 20:20:05    阅读次数:98
主席树
主席树/转自b站agoh #include<iostream> #include <vector> #include <algorithm> using namespace std; const int maxn = 2e5 + 5; int a[maxn]; std::vector<int> v; ...
分类:其他好文   时间:2020-04-29 00:53:14    阅读次数:48
共13156条   上一页 1 ... 74 75 76 77 78 ... 1316 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!