Python tutorial #8 || Find the Runner-Up Score! - HackerRank solution

preview_player
Показать описание
Python tutorial #8 || Find the Runner-Up Score! - HackerRank solution

In this video we are going to solve "Find the Runner-Up Score!" problem on HackerRank.
This series helps you to get python certificate on hackerrank, which adds weight to your resume and helps to get placed in a good company.

Question:-

Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given n scores. Store them in a list and find the score of the runner-up.

Input Format
The first line contains n . The second line contains an array A[ ] of n integers each separated by a space.

Output Format
Print the runner-up score.

Sample Input 0
5
2 3 6 6 5
Sample Output 0
5

#python
#hackerrank
#tutorial
#Findtherunnerupscore
#learnit
#pythonforbeginners
#hackerranksolutions
#certificate
Рекомендации по теме
Комментарии
Автор

NOTE: By default HackerRank gave input code as a map, I converted it to a List (Ref line-3 in code).

learnitpython
Автор

Hi i have a question why did we had allready had 2 input Statements, by the provided code?

Pls explain.

kokos_
Автор

Please provide more explanation . Why we are using map function and break and array.

SnehaKumari-mbpx