<?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" href="rss.xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <title>Algorithms for Competitive Programming</title><description>The goal of this project is to translate the wonderful resource http://e-maxx.ru/algo which provides descriptions of many algorithms and data structures especially popular in field of competitive programming. Moreover we want to improve the collected knowledge by extending the articles and adding new articles to the collection.</description><link>https://cp-algorithms.com/</link><atom:link href="https://cp-algorithms.com/feed_rss_updated.xml" rel="self" type="application/rss+xml" /> <docs>https://github.com/cp-algorithms/cp-algorithms</docs><language>en</language> <pubDate>Wed, 15 Apr 2026 12:37:11 -0000</pubDate> <lastBuildDate>Wed, 15 Apr 2026 12:37:11 -0000</lastBuildDate> <ttl>1440</ttl> <generator>MkDocs RSS plugin - v1.18.1</generator> <image> <url>None</url> <title>Algorithms for Competitive Programming</title> <link>https://cp-algorithms.com/</link> </image> <item> <title>Tortoise and Hare Algorithm (Linked List cycle detection)</title> <description>&lt;h1&gt;Floyd&#39;s Linked List Cycle Finding Algorithm&lt;/h1&gt; &lt;p&gt;Given a linked list where the starting point of that linked list is denoted by &lt;strong&gt;head&lt;/strong&gt;, and there may or may ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/others/tortoise_and_hare.html</link> <pubDate>Tue, 14 Apr 2026 13:15:23 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/others/tortoise_and_hare.html</guid> </item> <item> <title>Manacher&#39;s Algorithm - Finding all sub-palindromes in O(N)</title> <description>&lt;h1&gt;Manacher&#39;s Algorithm - Finding all sub-palindromes in $O(N)$&lt;/h1&gt; &lt;h2&gt;Statement&lt;/h2&gt; &lt;p&gt;Given string $s$ with length $n$. Find all the pairs $(i, j)$ such that substri...&lt;/p&gt;</description> <link>https://cp-algorithms.com/string/manacher.html</link> <pubDate>Sun, 12 Apr 2026 00:41:41 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/string/manacher.html</guid> </item> <item> <title>Modular Inverse</title> <description>&lt;h1&gt;Modular Multiplicative Inverse&lt;/h1&gt; &lt;h2&gt;Definition&lt;/h2&gt; &lt;p&gt;A &lt;a href=&#34;http://en.wikipedia.org/wiki/Modular_multiplicative_inverse&#34;&gt;modular multiplicative inverse&lt;/a&gt; of an intege...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/module-inverse.html</link> <pubDate>Fri, 10 Apr 2026 14:25:37 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/algebra/module-inverse.html</guid> </item> <item> <title>Length of the union of segments</title> <description>&lt;h1&gt;Length of the union of segments&lt;/h1&gt; &lt;p&gt;Given $n$ segments on a line, each described by a pair of coordinates $(a_{i1}, a_{i2})$. We have to find the length of th...&lt;/p&gt;</description> <link>https://cp-algorithms.com/geometry/length-of-segments-union.html</link> <pubDate>Thu, 09 Apr 2026 22:54:02 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/geometry/length-of-segments-union.html</guid> </item> <item> <title>Bipartite Graph Check</title> <description>&lt;h1&gt;Check whether a graph is bipartite&lt;/h1&gt; &lt;p&gt;A bipartite graph is a graph whose vertices can be divided into two disjoint sets so that every edge connects two verti...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/bipartite-check.html</link> <pubDate>Thu, 02 Apr 2026 14:40:02 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/graph/bipartite-check.html</guid> </item> <item> <title>Disjoint Set Union</title> <description>&lt;h1&gt;Disjoint Set Union&lt;/h1&gt; &lt;p&gt;This article discusses the data structure &lt;strong&gt;Disjoint Set Union&lt;/strong&gt; or &lt;strong&gt;DSU&lt;/strong&gt;. Often it is also called &lt;strong&gt;Union Find&lt;/strong&gt; because of its two ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/data_structures/disjoint_set_union.html</link> <pubDate>Sun, 29 Mar 2026 22:17:21 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/data_structures/disjoint_set_union.html</guid> </item> <item> <title>Lowest Common Ancestor - Binary Lifting</title> <description>&lt;h1&gt;Lowest Common Ancestor - Binary Lifting&lt;/h1&gt; &lt;p&gt;Let $G$ be a tree. For every query of the form &lt;code&gt;(u, v)&lt;/code&gt; we want to find the lowest common ancestor of the nodes `u...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/lca_binary_lifting.html</link> <pubDate>Sun, 29 Mar 2026 22:17:21 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/graph/lca_binary_lifting.html</guid> </item> <item> <title>Gray code</title> <description>&lt;h1&gt;Gray code&lt;/h1&gt; &lt;p&gt;Gray code is a binary numeral system where two successive values differ in only one bit. &lt;/p&gt; &lt;p&gt;Denote by $G(n)$ the representation of the number $n$...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/gray-code.html</link> <pubDate>Thu, 26 Mar 2026 19:44:21 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/algebra/gray-code.html</guid> </item> <item> <title>Manhattan Distance</title> <description>&lt;h1&gt;Manhattan Distance&lt;/h1&gt; &lt;h2&gt;Definition&lt;/h2&gt; &lt;p&gt;For points $p$ and $q$ on a plane, we can define the distance between them as the sum of the differences between their $...&lt;/p&gt;</description> <link>https://cp-algorithms.com/geometry/manhattan-distance.html</link> <pubDate>Fri, 20 Mar 2026 20:41:53 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/geometry/manhattan-distance.html</guid> </item> <item> <title>The Stern-Brocot Tree and Farey Sequences</title> <description>&lt;h1&gt;The Stern-Brocot tree and Farey sequences&lt;/h1&gt; &lt;h2&gt;Stern-Brocot tree&lt;/h2&gt; &lt;p&gt;The Stern-Brocot tree is an elegant construction to represent the set of all positive frac...&lt;/p&gt;</description> <link>https://cp-algorithms.com/others/stern_brocot_tree_farey_sequences.html</link> <pubDate>Thu, 19 Mar 2026 12:44:12 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/others/stern_brocot_tree_farey_sequences.html</guid> </item> <item> <title>Centroid decomposition</title> <description>&lt;h1&gt;Centroid Decomposition&lt;/h1&gt; &lt;p&gt;Prerequisite knowledge: &lt;a href=&#34;./depth-first-search.md&#34;&gt;Depth First Search (DFS)&lt;/a&gt;, [Divide and Conquer](https://en.wikipedia.org/wiki/Div...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/centroid_decomposition.html</link> <pubDate>Sat, 14 Mar 2026 12:03:59 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/graph/centroid_decomposition.html</guid> </item> <item> <title>Divide and Conquer DP</title> <description>&lt;h1&gt;Divide and Conquer DP&lt;/h1&gt; &lt;p&gt;Divide and Conquer is a dynamic programming optimization.&lt;/p&gt; &lt;h3&gt;Preconditions&lt;/h3&gt; &lt;p&gt;Some dynamic programming problems have a recurrence of ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/dynamic_programming/divide-and-conquer-dp.html</link> <pubDate>Thu, 26 Feb 2026 01:27:05 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/dynamic_programming/divide-and-conquer-dp.html</guid> </item> <item> <title>Basic Geometry</title> <description>&lt;h1&gt;Basic Geometry&lt;/h1&gt; &lt;p&gt;In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geome...&lt;/p&gt;</description> <link>https://cp-algorithms.com/geometry/basic-geometry.html</link> <pubDate>Mon, 16 Feb 2026 20:12:36 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/geometry/basic-geometry.html</guid> </item> <item> <title>Binary Exponentiation</title> <description>&lt;h1&gt;Binary Exponentiation&lt;/h1&gt; &lt;p&gt;Binary exponentiation (also known as exponentiation by squaring) is a trick which allows to calculate $a^n$ using only $O(\log n)$ m...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/binary-exp.html</link> <pubDate>Thu, 05 Feb 2026 08:07:35 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/algebra/binary-exp.html</guid> </item> <item> <title>Maximum flow - Ford-Fulkerson and Edmonds-Karp</title> <description>&lt;h1&gt;Maximum flow - Ford-Fulkerson and Edmonds-Karp&lt;/h1&gt; &lt;p&gt;The Edmonds-Karp algorithm is an implementation of the Ford-Fulkerson method for computing a maximal flow i...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/edmonds_karp.html</link> <pubDate>Wed, 21 Jan 2026 07:42:17 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/graph/edmonds_karp.html</guid> </item> <item> <title>Randomized Heap</title> <description>&lt;h1&gt;Randomized Heap&lt;/h1&gt; &lt;p&gt;A randomized heap is a heap that, through using randomization, allows to perform all operations in expected logarithmic time.&lt;/p&gt; &lt;p&gt;A **min hea...&lt;/p&gt;</description> <link>https://cp-algorithms.com/data_structures/randomized_heap.html</link> <pubDate>Fri, 16 Jan 2026 19:22:03 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/data_structures/randomized_heap.html</guid> </item> <item> <title>Navigation</title> <description>&lt;ul&gt; &lt;li&gt;Home&lt;ul&gt; &lt;li&gt;&lt;a href=&#34;index.md&#34;&gt;Main Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&#34;navigation.md&#34;&gt;Navigation&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&#34;tags.md&#34;&gt;Tag index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&#34;contrib.md&#34;&gt;How to Contribute&lt;/a&gt;&lt;/li&gt; &lt;li&gt;[Code of conduct]...&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt;</description> <link>https://cp-algorithms.com/navigation.html</link> <pubDate>Sat, 10 Jan 2026 20:28:53 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/navigation.html</guid> </item> <item> <title>Finding Power of Factorial Divisor</title> <description>&lt;h1&gt;Finding Power of Factorial Divisor&lt;/h1&gt; &lt;p&gt;You are given two numbers $n$ and $k$. Find the largest integer $x$ such that $k^x$ divides $n!$.&lt;/p&gt; &lt;h2&gt;Prime $k$ {data-t...&lt;/h2&gt;</description> <link>https://cp-algorithms.com/algebra/factorial-divisors.html</link> <pubDate>Mon, 29 Dec 2025 17:12:09 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/algebra/factorial-divisors.html</guid> </item> <item> <title>Finding Connected Components</title> <description>&lt;h1&gt;Search for connected components in a graph&lt;/h1&gt; &lt;p&gt;Given an undirected graph $G$ with $n$ nodes and $m$ edges. We are required to find in it all the connected com...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/search-for-connected-components.html</link> <pubDate>Sun, 28 Dec 2025 14:42:11 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/graph/search-for-connected-components.html</guid> </item> <item> <title>Euler&#39;s totient function</title> <description>&lt;h1&gt;Euler&#39;s totient function&lt;/h1&gt; &lt;p&gt;Euler&#39;s totient function, also known as &lt;strong&gt;phi-function&lt;/strong&gt; $\phi (n)$, counts the number of integers between 1 and $n$ inclusive, w...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/phi-function.html</link> <pubDate>Sun, 28 Dec 2025 13:07:53 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/algebra/phi-function.html</guid> </item> </channel> </rss>