find out the largest and second largest number in an array