MCPcopy Create free account
hub / github.com/anupam-kumar-krishnan/Competitive_Programming / swap

Function swap

Basic Programming/BubbleSort.cpp:16–20  ·  view source on GitHub ↗

function to swap two elements

Source from the content-addressed store, hash-verified

14
15// function to swap two elements
16void swap(int *x, int *y) {
17 int temp = *x;
18 *x = *y;
19 *y = temp;
20}
21
22// function to print array
23void printArr(int arr[], int n) {

Callers 15

bubbleSortFunction · 0.70
selection_sortFunction · 0.70
mainFunction · 0.50
mergeMethod · 0.50
sort012Method · 0.50
nextPermutationMethod · 0.50
reverseMethod · 0.50
rearrangeFunction · 0.50
minSwapFunction · 0.50
reverseStringMethod · 0.50
rotateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected