Find the second largest number in a sorted array.
Anonymous
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.
Check out your Company Bowl for anonymous work chats.