Implement function to find second max of array
Remove console logs