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.
Same. At first, I tried reduce and map along with str but had the last test failed. The next thing I did was change from map/reduce to simple loop and recur, and everything worked fine. Still not quite certain why the latter bears lower complexity, though.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
String Mingling
You are viewing a single comment's thread. Return to all comments →
Same. At first, I tried
reduce
andmap
along withstr
but had the last test failed. The next thing I did was change from map/reduce to simple loop andrecur
, and everything worked fine. Still not quite certain why the latter bears lower complexity, though.