We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Find the Runner-Up Score!
Find the Runner-Up Score!
Sort by
recency
|
8427 Discussions
|
Please Login in order to post a comment
n = int(input()) # 5 arr = map(int, input().split()) # 2 3 6 6 5
arr=list(arr) arr.sort() # 2 3 5 6 6 a=arr[n-1]
for i in range (1,n): if(arr[n-(i+1)]
if name == 'main': n = int(input()) arr = map(int, input().split()) scores=list(set(arr)) scores.sort(reverse=True) print(scores[1])
time complexity : O(n)
if name == 'main': n = int(input()) arr =list( map(int, input().split()))
print(sorted(set(arr))[-2])
n = int(input()) arr = map(int, input().split())