<?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>Sat, 22 Aug 2026 09:40:38 -0000</pubDate> <lastBuildDate>Sat, 22 Aug 2026 09:40:38 -0000</lastBuildDate> <ttl>1440</ttl> <generator>MkDocs RSS plugin - v1.19.0</generator> <image> <url>None</url> <title>Algorithms for Competitive Programming</title> <link>https://cp-algorithms.com/</link> </image> <item> <title>Number of divisors / sum of divisors</title> <description>&lt;h1&gt;Number of divisors / sum of divisors&lt;/h1&gt; &lt;p&gt;In this article we discuss how to compute the number of divisors $d(n)$ and the sum of divisors $\sigma(n)$ of a give...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/divisors.html</link> <pubDate>Sat, 22 Aug 2026 09:40:10 +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/divisors.html</guid> </item> <item> <title>Fibonacci Numbers</title> <description>&lt;h1&gt;Fibonacci Numbers&lt;/h1&gt; &lt;p&gt;The Fibonacci sequence is defined as follows:&lt;/p&gt; &lt;p&gt;$$F_0 = 0, F_1 = 1, F_n = F_{n-1} + F_{n-2}$$&lt;/p&gt; &lt;p&gt;The first elements of the sequence ([OEIS ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/fibonacci-numbers.html</link> <pubDate>Sat, 22 Aug 2026 09:40:10 +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/fibonacci-numbers.html</guid> </item> <item> <title>2-SAT</title> <description>&lt;h1&gt;2-SAT&lt;/h1&gt; &lt;p&gt;SAT (Boolean satisfiability problem) is the problem of assigning Boolean values to variables to satisfy a given Boolean formula. The Boolean formul...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/2SAT.html</link> <pubDate>Sat, 22 Aug 2026 09:11:13 +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/2SAT.html</guid> </item> <item> <title>Integer factorization</title> <description>&lt;h1&gt;Integer factorization&lt;/h1&gt; &lt;p&gt;In this article we list several algorithms for the factorization of integers, each of which can be either fast or varying levels of ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/factorization.html</link> <pubDate>Sat, 22 Aug 2026 05:53: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/algebra/factorization.html</guid> </item> <item> <title>Check if two segments intersect</title> <description>&lt;h1&gt;Check if two segments intersect&lt;/h1&gt; &lt;p&gt;You are given two segments $(a, b)$ and $(c, d)$. You have to check if they intersect. Of course, you may find their inter...&lt;/p&gt;</description> <link>https://cp-algorithms.com/geometry/check-segments-intersection.html</link> <pubDate>Wed, 12 Aug 2026 22:13:48 +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/check-segments-intersection.html</guid> </item> <item> <title>Fenwick Tree</title> <description>&lt;h1&gt;Fenwick Tree&lt;/h1&gt; &lt;p&gt;Let $f$ be some group operation (a binary associative function over a set with an identity element and inverse elements) and $A$ be an array ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/data_structures/fenwick.html</link> <pubDate>Fri, 07 Aug 2026 11:03:47 +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/fenwick.html</guid> </item> <item> <title>Chinese Remainder Theorem</title> <description>&lt;h1&gt;Chinese Remainder Theorem&lt;/h1&gt; &lt;p&gt;The Chinese Remainder Theorem (which will be referred to as CRT in the rest of this article) was discovered by Chinese mathemati...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/chinese-remainder-theorem.html</link> <pubDate>Fri, 07 Aug 2026 06:36:26 +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/chinese-remainder-theorem.html</guid> </item> <item> <title>Minimum Spanning Tree - Kruskal</title> <description>&lt;h1&gt;Minimum spanning tree - Kruskal&#39;s algorithm&lt;/h1&gt; &lt;p&gt;Given a weighted undirected graph. We want to find a subtree of this graph which connects all vertices (i.e. i...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/mst_kruskal.html</link> <pubDate>Fri, 07 Aug 2026 06:34:38 +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/mst_kruskal.html</guid> </item> <item> <title>Eulerian Path</title> <description>&lt;h1&gt;Finding the Eulerian path in $O(M)$&lt;/h1&gt; &lt;p&gt;A Eulerian path is a path in a graph that passes through all of its edges exactly once. A Eulerian cycle is a Eulerian...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/euler_path.html</link> <pubDate>Wed, 22 Jul 2026 07:16: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/euler_path.html</guid> </item> <item> <title>Z-function</title> <description>&lt;h1&gt;Z-function and its calculation&lt;/h1&gt; &lt;p&gt;Suppose we are given a string $s$ of length $n$. The &lt;strong&gt;Z-function&lt;/strong&gt; for this string is an array of length $n$ where the $i$...&lt;/p&gt;</description> <link>https://cp-algorithms.com/string/z-function.html</link> <pubDate>Sat, 18 Jul 2026 07:22: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/string/z-function.html</guid> </item> <item> <title>Knapsack Problem</title> <description>&lt;h1&gt;Knapsack Problem&lt;/h1&gt; &lt;p&gt;Prerequisite knowledge: &lt;a href=&#34;https://cp-algorithms.com/dynamic_programming/intro-to-dp.html&#34;&gt;Introduction to Dynamic Programming&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Introduc...&lt;/h2&gt;</description> <link>https://cp-algorithms.com/dynamic_programming/knapsack.html</link> <pubDate>Thu, 09 Jul 2026 17:21: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/dynamic_programming/knapsack.html</guid> </item> <item> <title>Introduction to Dynamic Programming</title> <description>&lt;h1&gt;Introduction to Dynamic Programming&lt;/h1&gt; &lt;p&gt;The essence of dynamic programming is to avoid repeated calculation. Often, dynamic programming problems are naturall...&lt;/p&gt;</description> <link>https://cp-algorithms.com/dynamic_programming/intro-to-dp.html</link> <pubDate>Sat, 04 Jul 2026 13:31:14 +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/intro-to-dp.html</guid> </item> <item> <title>Catalan Numbers</title> <description>&lt;h1&gt;Catalan Numbers&lt;/h1&gt; &lt;p&gt;Catalan numbers is a number sequence, which is found useful in a number of combinatorial problems, often involving recursively-defined obje...&lt;/p&gt;</description> <link>https://cp-algorithms.com/combinatorics/catalan-numbers.html</link> <pubDate>Sat, 27 Jun 2026 06:48: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/combinatorics/catalan-numbers.html</guid> </item> <item> <title>Breadth First Search</title> <description>&lt;h1&gt;Breadth-first search&lt;/h1&gt; &lt;p&gt;Breadth first search is one of the basic and essential searching algorithms on graphs.&lt;/p&gt; &lt;p&gt;As a result of how the algorithm works, the p...&lt;/p&gt;</description> <link>https://cp-algorithms.com/graph/breadth-first-search.html</link> <pubDate>Sat, 27 Jun 2026 01:20:26 +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/breadth-first-search.html</guid> </item> <item> <title>String Hashing</title> <description>&lt;h1&gt;String Hashing&lt;/h1&gt; &lt;p&gt;Hashing algorithms are helpful in solving a lot of problems.&lt;/p&gt; &lt;p&gt;We want to solve the problem of comparing strings efficiently. The brute forc...&lt;/p&gt;</description> <link>https://cp-algorithms.com/string/string-hashing.html</link> <pubDate>Thu, 25 Jun 2026 09:38:19 +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/string-hashing.html</guid> </item> <item> <title>Balanced Ternary</title> <description>&lt;h1&gt;Balanced Ternary&lt;/h1&gt; &lt;p&gt;&lt;img alt=&#34;&amp;quot;Setun computer using Balanced Ternary system&amp;quot;&#34; src=&#34;https://earltcampbell.files.wordpress.com/2014/12/setun.jpeg?w=300&#34;&gt;&lt;/p&gt; &lt;p&gt;This is a non-stan...&lt;/p&gt;</description> <link>https://cp-algorithms.com/algebra/balanced-ternary.html</link> <pubDate>Sun, 21 Jun 2026 12:58: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/balanced-ternary.html</guid> </item> <item> <title>Binary Search</title> <description>&lt;h1&gt;Binary search&lt;/h1&gt; &lt;p&gt;&lt;strong&gt;Binary search&lt;/strong&gt; is a method that allows for quicker search of something by splitting the search interval into two. Its most common applica...&lt;/p&gt;</description> <link>https://cp-algorithms.com/num_methods/binary_search.html</link> <pubDate>Sat, 20 Jun 2026 12:37:43 +0000</pubDate> <source url="https://cp-algorithms.com/feed_rss_updated.xml">Algorithms for Competitive Programming</source><guid isPermaLink="true">https://cp-algorithms.com/num_methods/binary_search.html</guid> </item> <item> <title>Segment Tree</title> <description>&lt;h1&gt;Segment Tree&lt;/h1&gt; &lt;p&gt;A Segment Tree is a data structure that stores information about array intervals as a tree. This allows answering range queries over an array...&lt;/p&gt;</description> <link>https://cp-algorithms.com/data_structures/segment_tree.html</link> <pubDate>Sat, 20 Jun 2026 10:20:08 +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/segment_tree.html</guid> </item> <item> <title>Sqrt Decomposition</title> <description>&lt;h1&gt;Sqrt Decomposition&lt;/h1&gt; &lt;p&gt;Sqrt Decomposition is a method (or a data structure) that allows you to perform some common operations (finding sum of the elements of ...&lt;/p&gt;</description> <link>https://cp-algorithms.com/data_structures/sqrt_decomposition.html</link> <pubDate>Sun, 14 Jun 2026 13:41:51 +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/sqrt_decomposition.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>Sat, 13 Jun 2026 15:49:50 +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>