Week 3.md 475B

Week 3

Problem 1

Write a Java program to find the maximum and minimum value of an array.

Original Array: [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]
Maximum value for the above array = 77
Minimum value for the above array = 14

Problem 2

Write a Java program to find the duplicate values of an array of integer values.

Input:

Input Array : [1, 2, 5, 5, 6, 6, 7, 2]

Output:

Duplicate Element : 2
Duplicate Element : 5
Duplicate Element : 6