Find the second largest number in a sorted array.
Anonimo
Do you mean unsorted? If not, wouldn't this just be second last index (assuming ascending order sorted)? If this was unsorted, one could sort the array then take second last element. However, there is a quicker way of doing this which is to use quickselect algorithm.