(int arr[], int a, int b)
| 2 | //Function to partition the array around the range such |
| 3 | //that array is divided into three parts. |
| 4 | public static void swap(int arr[], int a, int b) |
| 5 | { |
| 6 | int x=arr[a]; |
| 7 | arr[a]=arr[b]; |
| 8 | arr[b]=x; |
| 9 | } |
| 10 | public void threeWayPartition(int array[], int a, int b) |
| 11 | { |
| 12 | // code here |