EndlessCheng/codeforces-go — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Go based competitive programming template library that I can use when practicing Codeforces, LeetCode, and ICPC style problems.

I want it to feel like a personal algorithm notebook, not just random code files. Organize the templates by topic, like data structures, strings, math, dynamic programming, graph algorithms, tree problems, search, sorting tricks, bit operations, geometry, and fast input output. For each important template, include clear comments, what the idea is, time complexity, when to use it, and a few related practice problem links if possible.

Please make the README the main index so I can quickly jump to any algorithm. The code should be practical for contests, easy to copy, and written in clean Go. Include common reusable snippets for things like heaps, union find, segment trees, Fenwick trees, shortest paths, flows, KMP, tries, DP patterns, combinatorics, and number theory.

Look up current references online if you need to.

Want more depth? Deep Reverse