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

Function getMax

CPP/sorting/radix_sort.cpp:7–13  ·  view source on GitHub ↗

Function to get the largest element from an array

Source from the content-addressed store, hash-verified

5
6// Function to get the largest element from an array
7int getMax(int array[], int n) {
8 int max = array[0];
9 for (int i = 1; i < n; i++)
10 if (array[i] > max)
11 max = array[i];
12 return max;
13}
14
15// Using counting sort to sort the elements in the basis of significant places
16void countingSort(int array[], int size, int place) {

Callers 1

radixsortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected