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.
Excellent answer~ I fell back on regex to solve this. I like how you reset i =0 whenever you perform a string slice rather than going through the whole string and then reseting.
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 →
Excellent answer~ I fell back on regex to solve this. I like how you reset i =0 whenever you perform a string slice rather than going through the whole string and then reseting.