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.
What would you consider to be the "right" method? I appreciate your comment, but "Trust me" isn't a helpful explanation.
A reverse slice is much faster than a string .join(), for example. In terms of interviews, it's much better to show you know Python by using built-ins and the standard library. If they want it done "from scratch" they will tell you. In my opinion, a reverse slice is thus the "right" method.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
What would you consider to be the "right" method? I appreciate your comment, but "Trust me" isn't a helpful explanation.
A reverse slice is much faster than a string .join(), for example. In terms of interviews, it's much better to show you know Python by using built-ins and the standard library. If they want it done "from scratch" they will tell you. In my opinion, a reverse slice is thus the "right" method.