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.
This isnt scalable although it might be efficient. What if you second lowest or highest is at a 5th position in the list? Your code fails in that case.
Always remember the code is only efficient if it is scalable and ofcourse smaller the better.
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 →
This isnt scalable although it might be efficient. What if you second lowest or highest is at a 5th position in the list? Your code fails in that case.
Always remember the code is only efficient if it is scalable and ofcourse smaller the better.