Class GetMaximumFromList
java.lang.Object
topics.foundation.maximum.GetMaximumFromList
Maximum Value Extraction
Provides a sequential mathematical utility to identify the maximum element contained within a one-dimensional integer array.
Complexity
- Time Complexity:
O(N)- Requires a single linear traversal evaluating every element. - Space Complexity:
O(1)- The evaluation requires a strictly constant amount of auxiliary memory.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintmax(int[] numbers) Computes the maximum value within the provided sequence of integers.
-
Constructor Details
-
GetMaximumFromList
public GetMaximumFromList()
-
-
Method Details
-
max
public int max(int[] numbers) Computes the maximum value within the provided sequence of integers.- Parameters:
numbers- The integer array to be evaluated.- Returns:
- The highest integer value found within the array.
- Throws:
IllegalArgumentException- if the provided array is null or empty.
-