Given an array of numbers, an element is called a leader if it is greater than all the elements in front of it. What is the sum of the leaders in the text file?
As an explicit example, in the array , the leaders of the array are 14 and 7.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.