码迷,mamicode.com
首页 >  
搜索关键字:radix sort    ( 13156个结果)
go语言小练习——给定英语文章统计单词数量
给定一篇英语文章,要求统计出所有单词的个数,并按一定次序输出。思路是利用go语言的map类型,以每个单词作为关键字存储数量信息,代码实现如下: 1 package main 2 3 import ( 4 "fmt" 5 "sort" 6 ) 7 8 func wordCounterV1(str st ...
分类:编程语言   时间:2020-01-28 09:34:22    阅读次数:80
【leetcode】1329. Sort the Matrix Diagonally
题目如下: Given a m * n matrix mat of integers, sort it diagonally in ascending order from the top-left to the bottom-right then return the sorted array. ...
分类:其他好文   时间:2020-01-27 19:06:23    阅读次数:72
Fennec vs Monster
C Fennec vs Monster 1. 链接 "C Fennec vs Monster" 2. 题意 消去k个最大值后,输出剩下的数组和。 3. 代码实现 ...
分类:其他好文   时间:2020-01-27 15:24:53    阅读次数:74
ZJNU 1528 - War--高级
类似于1213取水 可以把空投当作第0个城市 最后将0~n的所有城市跑最小生成树 1 /* 2 Written By StelaYuri 3 */ 4 #include<iostream> 5 #include<algorithm> 6 using namespace std; 7 struct r ...
分类:其他好文   时间:2020-01-27 09:43:38    阅读次数:80
十大排序算法(Java实现)
一、冒泡排序(Bubble Sort) 二、选择排序(Selection Sort) 三、插入排序(Insertion Sort) 九、桶排序(Bucket Sort) ...
分类:编程语言   时间:2020-01-26 22:13:19    阅读次数:121
leetcode1334
1 from heapq import heappush, heappop 2 class Solution: 3 def findTheCity(self, n: int, edges: 'List[List[int]]', distanceThreshold: int) -> int: 4 di ...
分类:其他好文   时间:2020-01-26 19:23:59    阅读次数:87
【PAT甲级】1052 Linked List Sorting (25分)
1052 Linked List Sorting (25分) A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each str ...
分类:其他好文   时间:2020-01-26 19:07:47    阅读次数:72
Python 细节2
1. for循环时,变量的初始化范围: lenth = 8for i in range(lenth): # i的范围是[0,8) ''' processing module ''' for i in range(1,lenth): # i的范围是[1,8) ''' processing module ...
分类:编程语言   时间:2020-01-26 17:43:19    阅读次数:68
sort 根据不同数据类型进行排序
功能: 根据不同数据类型进行排序 格式: sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=F 参数: -b, --ignore-leading-blanks 忽略每行开始前的空格 ignore leading blanks -d, ...
分类:编程语言   时间:2020-01-26 13:13:27    阅读次数:116
leetcode1329
1 class Solution: 2 def diagonalSort(self, mat: 'List[List[int]]') -> 'List[List[int]]': 3 m = len(mat) 4 n = len(mat[0]) 5 6 i,j = m-1,0 7 while i != ...
分类:其他好文   时间:2020-01-26 10:34:04    阅读次数:98
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!