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.
In the real world, if performance isn't affected drastically, readability (even at the expense of redundancy) is always preferred. Its especially helpful with legacy applications. So in this case, I would say that the presence of the additional if is actually a good practice.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →
In the real world, if performance isn't affected drastically, readability (even at the expense of redundancy) is always preferred. Its especially helpful with legacy applications. So in this case, I would say that the presence of the additional if is actually a good practice.