You are viewing a single comment's thread. Return to all comments →
Still, this is a bad approach, because the runtime complexity is O(n* m).
Using hashtables can make a linear time of O(n+m), which is much faster.
This excercise is all about dictionaries and hashtables, so I suggest using them, otherwise you could fail an interview test by not practicing them.
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
Still, this is a bad approach, because the runtime complexity is O(n* m).
Using hashtables can make a linear time of O(n+m), which is much faster.
This excercise is all about dictionaries and hashtables, so I suggest using them, otherwise you could fail an interview test by not practicing them.