← Back to topics
Topic

Time Limit Exceed...

p
pK-lst
Guys,look at my Profile,and see the source code about the z-passwrd problem,i am pretty sure the algorithm is working fine,i tested it,and as you can see the only problem is the Time Limit,how can i improve my code,how can i make it faster :)
A
Amtrix
With a datastructure which speeds up searching :)
d
dejandenib
You won't be able to solve most of the tasks here on z-trening with so simple algorithms. You need a more advanced and sophisticated algorithm.
Hint: Quick sort and binary search.
p
pK-lst
Во ред,фала,ќе видам што ќе направам откако ќе ги научам алгоритмите :)

Ok.thank you,i will see what can i do after i finish learning algorithms :)