Search in sources :

Example 36 with In

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

the class Ex09 method main.

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

Example 37 with In

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

the class Ex10 method main.

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

Example 38 with In

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

the class Ex14 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 39 with In

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

the class ThreeSumFast 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 40 with In

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

the class Multiway method main.

public static void main(String[] args) {
    int N = args.length;
    In[] streams = new In[N];
    for (int i = 0; i < N; i++) {
        streams[i] = new In(args[i]);
    }
    merge(streams);
}
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