1. Write an algorithm to check whether there are any duplicate elements in an array of n numbers. 2. Write an algorithm for finding

1. Write an algorithm to check whether there are any duplicate elements in an array of n numbers. 2. Write an algorithm for finding the element which appears the maximum number of times in an array of n numbers.