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.
Nope, you can compare unsigned int to signed int in this case as length() is always > 0, so casting via static_cast, which is almost always a bad practice, is simply not neccesary.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
Nope, you can compare unsigned int to signed int in this case as length() is always > 0, so casting via static_cast, which is almost always a bad practice, is simply not neccesary.