Search in sources :

Example 31 with In

use of edu.princeton.cs.algs4.In in project AlgorithmsSolutions by Allenskoo856.

the class Ex19 method main.

public static void main(String[] args) {
    String[] a = new In().readAllStrings();
    System.out.println(count(a));
}
Also used : In(edu.princeton.cs.algs4.In)

Example 32 with In

use of edu.princeton.cs.algs4.In in project AlgorithmsSolutions by Allenskoo856.

the class Ex20 method main.

public static void main(String[] args) {
    String[] a = new In().readAllStrings();
    int[] perm = sort(a);
    for (int i = 0; i < perm.length; i++) {
        System.out.print(perm[i] + " ");
    }
    System.out.println();
}
Also used : In(edu.princeton.cs.algs4.In)

Example 33 with In

use of edu.princeton.cs.algs4.In in project AlgorithmsSolutions by Allenskoo856.

the class Ex05 method main.

public static void main(String[] args) {
    String[] a = new In().readAllStrings();
    sort(a);
    show(a);
}
Also used : In(edu.princeton.cs.algs4.In)

Example 34 with In

use of edu.princeton.cs.algs4.In in project AlgorithmsSolutions by Allenskoo856.

the class ThreeSum method main.

public static void main(String[] args) {
    int[] a = new In(args[0]).readAllInts();
    StdOut.println(count(a));
}
Also used : In(edu.princeton.cs.algs4.In)

Example 35 with In

use of edu.princeton.cs.algs4.In in project AlgorithmsSolutions by Allenskoo856.

the class TwoSumFast method main.

public static void main(String[] args) {
    int[] a = new In(args[0]).readAllInts();
    StdOut.println(count(a));
}
Also used : In(edu.princeton.cs.algs4.In)

Aggregations

In (edu.princeton.cs.algs4.In)71 StdIn (edu.princeton.cs.algs4.StdIn)10 HashSet (chapter3.section5.HashSet)5 ArrayList (java.util.ArrayList)5 SeparateChainingHashTable (chapter3.section4.SeparateChainingHashTable)4 ST (edu.princeton.cs.algs4.ST)4 Stopwatch (edu.princeton.cs.algs4.Stopwatch)4 Bag (com.jimmysun.algorithms.chapter1_3.Bag)3 Queue (edu.princeton.cs.algs4.Queue)3 SET (edu.princeton.cs.algs4.SET)3 RedBlackBST (chapter3.section3.RedBlackBST)2 Transaction (edu.princeton.cs.algs4.Transaction)2 Bag (chapter1.section3.Bag)1 Queue (chapter1.section3.Queue)1 Queue (com.jimmysun.algorithms.chapter1_3.Queue)1 Date (edu.princeton.cs.algs4.Date)1 Out (edu.princeton.cs.algs4.Out)1 File (java.io.File)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1