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.
yes, as far as i've read it makes the include? search 0(1) instead of 0(n). It's my first time using a set, but it seems like it would be faster any time order doesn't matter (and count doesn't matter since it seems to only hold unique elements.)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weighted Uniform Strings
You are viewing a single comment's thread. Return to all comments →
yes, as far as i've read it makes the include? search 0(1) instead of 0(n). It's my first time using a set, but it seems like it would be faster any time order doesn't matter (and count doesn't matter since it seems to only hold unique elements.)