Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import edu.princeton.cs.algs4.*;
- public class Sorting1{
- public static void main(String[] args) {
- int N = Integer.parseInt(args[0]);
- //Býr til raðað fylki
- Integer []a1 = new Integer[N];
- for (int i = 0;i<N ;i++ ) {
- a1[i] = i;
- }
- //sort hlutinn
- BlackBoxSort sorted1 = new BlackBoxSort();
- Stopwatch stop1 = new Stopwatch();
- sorted1.sort6(a1);
- double timi1 = stop1.elapsedTime();
- //prenta þetta drasl út
- StdOut.println("N = " + N);
- StdOut.println("Tíminn er: " + timi1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement