Ledger Nano X - The secure hardware wallet
SHARE
TWEET

quick sort main()

Aldin-SXR Apr 8th, 2020 179 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.     int[] elements = new int[100];
  3.     Random random = new Random();
  4.        
  5.     /* Generate random elements */
  6.     for (int i = 0; i < elements.length; i++) {
  7.         elements[i] = random.nextInt(1000);
  8.     }
  9.        
  10.     /* Sort the array */
  11.     QuickSort.sort(elements);
  12.        
  13.     /* Print the elements */
  14.     for (int i: elements) {
  15.         System.out.println(i);
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top