In the following video they show you some algorithms, here is my implementation, that also compares performance.
And here is my code code:
The results are the following:
findRandom= 1409 => 20032 ms
findSorted= 1310 => 20013 ms
findTwoLoops= 216 => 20197 ms
findTwoLoops+sort=215 => 19917 ms
As you can see the best algorithm is findRandom performed 1409 times in the 20 seconds.
Happy Hacking!!!
No hay comentarios:
Publicar un comentario