Checks if starting element exists or not , if the starting element of the mountain sub - array exists then the index of ending element is stored in k
if ( j != - 1 ) : NEW_LINE INDENT k = i + 1 NEW_LINE DEDENT