← Back to topics
Topic

magic four - speed

a
aleksa92
I tries 2 ideas:
first is simple searching for string and i get tle on 7 examples.
second idea was using binary search, and i get tle on 3 examples.

How can i do this task without geting tle?
g
gates
using hash, you can represent every string with integer.
a
aleksa92
works like magic! Thank you :)