MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / swap

Method swap

ThreeWayPartitioning.java:4–9  ·  view source on GitHub ↗
(int arr[], int a, int b)

Source from the content-addressed store, hash-verified

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

Callers 1

threeWayPartitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected