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

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