function findMinMax($arr) {
$min = min($arr);
$max = max($arr);
return ["min" => $min, "max" => $max];
}
// Example usage:
$array = [3, 7, 2, 9, 1, 6];
$result = findMinMax($array);
echo "Minimum value: " . $result["min"] . ", Maximum value: " . $result["max"];
Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
Subscribe
Login
0 Comments
Oldest