You are viewing a single comment's thread. Return to all comments →
The indexing starts from -1 for right to left. So if the array is sorted then, the index of second-to-last element would be -2.
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
The indexing starts from -1 for right to left. So if the array is sorted then, the index of second-to-last element would be -2.