Amazon Interview Question

Test case for Mobile phonebook

Interview Answers

Anonymous

Apr 8, 2016

To find the second largest: Take 2 variable first and second and traverse once. public void secondSmall(int [] arr){ int first,second; //if size of array is small if (arr.length first && arr[i]< second){ second=arr[i]; } } System.out.println("Second largest number is " +second); }

Anonymous

Feb 1, 2013

Could u please give the solution for interview that u mention? Its urgent. All the 5 questions I want to get answer.

2