array find the second highest value

Viewed 1181

I have an array contains 10 integer values. Now I want to find out the second highest number.I should not use any java API. This question was asked by one interviewer to me. He wants the logic.And his requirement is, I should not traverse through the the entire elements. Is there any way where we can achieve the result without traversing? Travesing means going through all the elements in the array. I thought for long time.Finally I gave up. If any one can explain, it would be nice. And also I asked about Sorting. He does not want the array to be sorted.

4 Answers
Related