MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / swap

Function swap

CPP/sorting/quicksort.cpp:6–11  ·  view source on GitHub ↗

A utility function to swap two elements

Source from the content-addressed store, hash-verified

4
5// A utility function to swap two elements
6void swap(int* a, int* b)
7{
8 int t = *a;
9 *a = *b;
10 *b = t;
11}
12
13/* This function takes last element as pivot, places
14the pivot element at its correct position in sorted

Callers 1

partitionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected