Your hash function is O(N). It’s not better than just comparing it directly.
https://cp-algorithms.com/string/string-hashing.html
1 Like
thanks for reply.
Your hash function is O(N). It’s not better than just comparing it directly.
https://cp-algorithms.com/string/string-hashing.html
thanks for reply.