daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Quicksort {
  2.     public static int[] sort(int[] arr){
  3.        
  4.         int l = 0;
  5.         int r = arr.length - 1;
  6.         if(l<r) {
  7.             int s = Math.floor((r + l) / 2)
  8.             int arr = ArrayUtils.addAll(
  9.                     ArrayUtils.addAll(sort(arr.copyOfRange(l, s - 1)), s), arr.copyOfRange(s + 1, r));
  10.         }
  11.         return arr;
  12.     }
  13. }
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