基数排序不同于其他的七种排序算法,它是基于一种分配法,而非比较。基数排序属于“分配式排序”(distribution sort),基数排序法又称“桶子法”(bucket sort)或bin sort,顾名思义,它是透过键值的部份资讯,将要排序的元素分配至某些“桶”中,藉以达到排序的作用。它的灵感来自于队列(Queue),它最独特的地方在于利用了数字的有穷性(阿拉伯数字只有0到9的10个)。...
分类:
编程语言 时间:
2015-08-21 13:39:01
阅读次数:
358
本文目录一、十进制二、二进制三、八进制四、十六进制五、进制总结六、变量与进制七、printf的简单使用上一讲简单介绍了常量和变量,这讲补充一点计算机的基础知识---进制。我们先来看看平时是如何表示一个整数的,最常见的肯定是用阿拉伯数字表示,比如“十二”,我们可以用12来表示,其实这种表示方式是基于一...
分类:
移动开发 时间:
2015-08-20 12:35:22
阅读次数:
183
方法一 function DX(n) { if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)) return "数据非法"; var unit = "千百拾亿千百拾万千百拾元角分", str = ""; ...
分类:
Web程序 时间:
2015-08-17 15:21:42
阅读次数:
125
输入是一个只包含拼音的字符串,请输出对应的数字序列。转换关系如下:
描述: 拼音 yi er san si wu liu qi ba jiu
阿拉伯数字 1 2 3 4 5 6 7 8 9
输入字符只包含小写字母,所有字符都可以正好匹配
运行时间限制:无限制
内存限制: 无限制
输入: 一行字符串,长度小于1000
输出: 一行字符(数字)串
样例输入: yie...
分类:
其他好文 时间:
2015-08-14 10:02:23
阅读次数:
176
题目:罗马数字转为阿拉伯数字
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
分析:题意:将给定的罗马数字转为阿拉伯数字
从前往后遍历罗马数字,如果某个数比前一个数小,则把该数加入到结果中;
反之,则在结果中两次减去前一个数并加...
分类:
其他好文 时间:
2015-08-13 20:11:14
阅读次数:
135
题目:阿拉伯数字转罗马数字Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.原题链接地址:https://leetcode.com/problems/integer-to-roman/
分析:题意将阿拉伯数字num转罗马数字
拼写...
分类:
其他好文 时间:
2015-08-13 20:10:49
阅读次数:
129
1.我等屌丝喜欢简单粗暴,首先来一幅图
哥们我是大陆人,当然默认语言是 中文简体,但是我刚刚切换成了繁体了
2.看下配置文件,按照这个格式 ,看图吧,简单粗暴,别问为什么,你就按照这样写,如果你想知道为什么这样写,以及详细的步骤,请百度 : Android 多语言
阿拉伯语 ar, 德语 de ,英语 en ,西班牙 es, 法语 fr ,日语 ja ,韩语 ko ,葡萄...
分类:
移动开发 时间:
2015-08-12 01:19:50
阅读次数:
506
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Solution:基本字符IVXLCDM相应的阿拉伯数字表示为1510501005001...
分类:
其他好文 时间:
2015-08-08 01:13:53
阅读次数:
145
functionDX(n) {if(!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))return"数据非法";varunit = "千百拾亿千百拾万千百拾元角分", str = "";n += "00";varp = n.indexOf('.');if(p >= 0)n = n....
分类:
Web程序 时间:
2015-08-05 14:33:08
阅读次数:
124
1、题目名称 Roman to Integer (罗马数字到阿拉伯数字的转换) 2、题目地址 https://leetcode.com/problems/roman-to-integer/ 3、题目内容 英文:Given a roman numeral, convert it to an integer. Input is g...
分类:
其他好文 时间:
2015-08-04 08:14:55
阅读次数:
229