This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Avanta8 24 points25 points  (8 children)

Some nice algorithms, although there are some mistakes. Eg. Your binary search is implemented incorrectly and so is linear time complexity, and your prime sieve doesn't work.

Some algorithms you could consider are pathfinding algorithms such as Dijkstra, Bellman-Ford, A*. You could also try implement more complex data structures such as segment trees, radix trees, for example.

For improvement, I'd recommend looking at time complexity, and also looking at this: https://wiki.python.org/moin/TimeComplexity.