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.
Python Tip rather than a solution:
- A data type 'set' is faster to find a value than a data type 'list'.
- It is because 'set' follows hash-based search O(1) and 'list' follows the linear search O(n).
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 →
Python Tip rather than a solution: - A data type 'set' is faster to find a value than a data type 'list'. - It is because 'set' follows hash-based search O(1) and 'list' follows the linear search O(n).