Finding the maximum and minimum elements from an array of n distinct elements by the best algorithm is:
Answers
Answered by
8
Explanation:
In Java you can find maximum or minimum value in anumeric array by looping through the array.
Arrays.sort(nums);3. System.out.println"Minimum " nums[0]);4. System.out.println"Maximum "nums[nums.length-1]);
1. intl nums-{6,-1,-2,-3,0,1,2,3,4};2. Arrays.sort(nums);3. System.out.println"Minimum " nums[0]);4. System.out.println"Maximum "nums[nums.length-1]);-
Answered by
15
Answer:
In java u can find maximum or minimum value in a numeric array by looping through the array
HOPE THIS HELPS YOU ❣️❣️✔️✔️✌️✌️
Similar questions