详细讲解见《2015版数据结构高分笔记》8.6节——基数排序。
Java代码如下:
package linetimesort;
import java.util.LinkedList;
import java.util.Objects;
/**
* 基数排序的思想是多关键字排序
* @author yuncong
*
*/
public class RadixSort {
/**...
分类:
编程语言 时间:
2015-05-19 22:51:24
阅读次数:
145
详细讲解见《算法导论》8.2节——计数排序。
Java代码如下:
package linetimesort;
/**
* 计数排序假设n个输入元素中的每一个都是介于0到k之间的某个整数,k为某个整数;它
* 通过确定小于等于一个数的数的个数来确定这个数应该放在哪个位置
* @author yuncong
*
*/...
分类:
编程语言 时间:
2015-05-19 22:49:45
阅读次数:
176
详细讲解见《算法导论》8.4节——桶排序。
Java代码如下:
package linetimesort;
import java.util.LinkedList;
import sort.InsertSort;
/**
* 桶排序假设输入元素均匀而独立的分布在区间[0,1)上;
* 桶排序的核心思想是,将[0,1)分为n个大小相同的子区间,
* 上一个区间里的元素都比下一个区间里的...
分类:
编程语言 时间:
2015-05-19 22:49:02
阅读次数:
167
一、只读设置package Guava;import java.util.ArrayList;
import java.util.Collections;
import java.util.List;import com.google.common.collect.ImmutableList;
/**
* 只读设置
*/
public class Demo01 {
public stat...
分类:
其他好文 时间:
2015-05-19 22:43:06
阅读次数:
141
1.直接上代码:
package com.mnmlist.java.grammar;
import java.util.Random;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
class Customer {
int total;
publi...
分类:
编程语言 时间:
2015-05-19 22:40:58
阅读次数:
164
Problem:
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one
1" or 11.
11 is read off as "two
1s" or 21.
21 i...
分类:
编程语言 时间:
2015-05-19 22:40:36
阅读次数:
251
很久以前学C时, 就弄过出局游戏, 当时很感兴趣不过没有做出来
今天看到了一个java里有类似的题,(约瑟夫java设计大作业,题目类似,但有政.治色彩就不提了) 觉得用面向对象来做更合适……
下面是C#版解法。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
nam...
分类:
其他好文 时间:
2015-05-19 22:38:28
阅读次数:
206
适合应届生面试用,因为缺乏项目经验。 夯实一下基础。 临时抱抱佛教也可以。PDF清晰文字版
http://www.rcdisk.com/index.php/group/topic/id-62...
分类:
编程语言 时间:
2015-05-19 22:36:57
阅读次数:
398