You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
n = int(input())
arr = list(map(int, input().split()))
print(max([x for x in arr if x != max(arr)]))
Feel free to ask if you have any questions :)
That's wrong! The arr can only be used once.
Hello) Why do you think so? I believe there is no mistake in this solution.