加载中
旋转左字符串

public static void reverseString(char[] cs, int from, int to){     while(from < to){       char c = cs[from];       cs[from++] = cs[--to];       cs[to] = c;     }   }...

2014/09/25 18:48
10
基数排序 和桶排序

import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; public class RadixSort{   public static void radixSort(int arr[], int maxDigits){     int exp = 1...

2014/09/09 18:04
28
各种排序算法

一、冒泡(Bubble)排序——相邻交换 二、选择排序——每次最小/大排在相应的位置 三、插入排序——将下一个插入已排好的序列中 四、壳(Shell)排序——缩小增量 五、归并排序 六、快速排序...

2014/05/29 21:33
168
找到某条路径上和为一定数值的路径.

import java.util.Stack; public class Node { Node left; Node right; int value; public static void main(String args[]){   Node node7 = new Node(null, nul...

2014/05/29 10:05
33
K smallest Number

K smallest Number Selection Sort public class KSmallesFinder { public static void main(String[] args) {   int ns[] = {49, 38, 65, 97, 76, 13, 27, 49, 55, 04};   //}   ...

2014/05/29 09:47
15
输出连续字符窜

Beginning CS student here, trying to get a handle on loops. My task is to take a String s, such that if s = 'abcd', the program will print: 'a,b,c,d,ab,bc,cd,abc,bcd,abcd'. Cl...

2014/03/19 17:58
20
LevensteinDistance

In information theory and computer science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences (i.e. an edit distance). The Levens...

2014/03/14 16:46
20
Java 逻辑判断boolean赋值

public class TestIf { public static void main(String args[]){   int i = 1;   int y = 1; //   if(i = y){Compile Error //      //   }      boolean a = true; ...

2013/12/06 17:11
245
IndexSearcher

1. rewrite

2013/12/05 19:16
12
Boyer-Moore algorithm

Main features performs the comparisons from right to left; preprocessing phase in O(m+) time and space complexity; searching phase in O(mn) time complexity; 3n text character co...

2013/12/05 13:45
91

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部