Question: using java should make two method max and min - ALGORITHM: Step 1: Initialize the variables in the main function Step 2: Get the total

using java

should make two method max and min

using java should make two method max and min - ALGORITHM: Step

- ALGORITHM: Step 1: Initialize the variables in the main function Step 2: Get the total number of items to be inserted int the list before you insert the items to the list. Step 3: Insert the items to the list (both Sorted and Unsorted) Step 4: The function is called. If there is only one element then the max and min is the same element Step 5: If there is two element then check if a[x] is less than aly] then a[x] is min and a[y] is max Step 6: If there is more number of items mid value is found Step 7: Now max is assigned to t1 and min to t2 Step 8: If the max is less than t1 the max is t1, if min is greater than t2 the min t2 Step 9: The min and max values are found and printed 22 INPUT How many numbers you want to add: 6 Enter the numbers: 33 59 11 67 92 05 OUTPUT Maximum Number = 92 Minimum Number = 05

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!