Answers for "find the runner-up score hackerrank solution python 3"

2

how to find runner up score in python

price=[10,20,4,5,4,6,46,43,4,64,65,8,45,55,558,15,5,4,6,5,255,5]
price.sort()
price.reverse()
max=price[0]
sec_max=price[1]
print(price)
print(f"the max is {max}, runner up is {sec_max}")
Posted by: Guest on November-16-2020
1

runner up score hackerrank solution

from collections import Counter
if __name__ == '__main__':
    n = int(raw_input())
    arr = Counter(map(int, raw_input().split())).keys()
    arr.sort()
    print arr[-2]
Posted by: Guest on August-18-2020

Code answers related to "find the runner-up score hackerrank solution python 3"

Browse Popular Code Answers by Language