Skip to main content

โซ Max

Returns the maximum value in the array.

๐Ÿ“ Syntaxโ€‹

TypeOfArray maximum()

๐Ÿ”ฎ Exampleโ€‹

DataTomeAnalysis<int, long int> intAverage(10);

for (int i = 1; i < 5; i++) {
intAverage.push(i);
}

intAverage.maximum(); // Will return 4

โฑ Complexityโ€‹

Linear (O(n)) in the point count.