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.
the method "count" will scan the entire data structure, which means O(n), since you are doing it for each element, that means we have O(n**2), consider using hashing somehow.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Climbing the Leaderboard
You are viewing a single comment's thread. Return to all comments →
the method "count" will scan the entire data structure, which means O(n), since you are doing it for each element, that means we have O(n**2), consider using hashing somehow.