Iโve been competing for about 10 years and have created a not-so-bad library myself. Most of the really good competitors have their own blogs, for example, the legend Pyotr Mitrichev , and there they explain the ideas that they received on some competitive issues. Reading them can help you - if you see that a good idea implements it and stores it. I add algorithms to my library when I see a problem that affects them. Thus, I can verify that my implementation is correct - I only add an algorithm if I have passed at least one problem with its implementation.
Here is a list with some of the algorithms that I have:
- I have a huge geometric library with classes representing points, lines, polygons, segments, circles and some operations with them (for example, intersection, convex hull of many points, etc.)
- Tarjan algorithm for highly related components
- Dinitz flow algorithm
- Bilateral compliance implementation
- Optimal implementation of a minimum cost stream.
- Aho-Corasic string search algorithm
- Knuth-morris-pratt string search algorithm
- Rabin-Karp string search algorithm
- Linear suffix tree using ukonnen algorithm
- Fast exponentiation
- Polynomial execution
- Big whole implementation
- Embedding Fractional Numbers
- Matrix class implementation
- Primary factorization
- Eratoshenes sieve
- Segment tree
- hungarian algorithm
- 2-Sat . For this, I use the Tarjan algorithm mentioned above.
You will notice that some of the most basic algorithms (for example, BFS, DFS, Dijkstra) are not mentioned above, and this is because I did not implement them. These algorithms cannot be easily generalized in such a way that you simply copy and paste them and everything will work. It also takes me less than 5 minutes to write them - I usually add only algorithms to my library that are either hard to implement or easy to make a mistake when implementing them.
source share