Skip to content

Instantly share code, notes, and snippets.

@abhinavkorpal
Created April 8, 2017 07:41
Show Gist options
  • Save abhinavkorpal/dd00c7e2a2cbc048b7771b76cf2e5272 to your computer and use it in GitHub Desktop.
Save abhinavkorpal/dd00c7e2a2cbc048b7771b76cf2e5272 to your computer and use it in GitHub Desktop.
Find the Second Largest Number
if __name__ == '__main__':
n = int(raw_input())
arr = map(int, raw_input().split())
print sorted(list(set(arr)))[-2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment