You are viewing a single comment's thread. Return to all comments →
which is the complexity of your algo? It's O(n*m) using maps the complexity will be O(n) * O(log m) that is much better!
O(n*m)
O(n) * O(log m)
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
which is the complexity of your algo? It's
O(n*m)
using maps the complexity will beO(n) * O(log m)
that is much better!