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.
It does work for your example. Are you perhaps thinking that one of the two students with 3.0 should be the answer? But, if two students are tied for the lowest score, neither one has the second-lowest score, as the problem states.
My code would answer Mary in your example, who has the second-lowest score, which in that case happens to also be the highest score.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
It does work for your example. Are you perhaps thinking that one of the two students with 3.0 should be the answer? But, if two students are tied for the lowest score, neither one has the second-lowest score, as the problem states.
My code would answer Mary in your example, who has the second-lowest score, which in that case happens to also be the highest score.