You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{"version": "https://jsonfeed.org/version/1", "title": "Algorithms for Competitive Programming", "home_page_url": "https://cp-algorithms.com/", "feed_url": "https://cp-algorithms.com/feed_json_updated.json", "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.", "icon": null, "authors": [], "language": "en", "items": [{"id": "https://cp-algorithms.com/others/tortoise_and_hare.html", "url": "https://cp-algorithms.com/others/tortoise_and_hare.html", "title": "Tortoise and Hare Algorithm (Linked List cycle detection)", "content_html": "<h1>Floyd's Linked List Cycle Finding Algorithm</h1>\n<p>Given a linked list where the starting point of that linked list is denoted by <strong>head</strong>, and there may or may ...</p>", "image": null, "date_modified": "2025-09-10T06:10:20+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/intersecting_segments.html", "url": "https://cp-algorithms.com/geometry/intersecting_segments.html", "title": "Search for a pair of intersecting segments", "content_html": "<h1>Search for a pair of intersecting segments</h1>\n<p>Given $n$ line segments on the plane. It is required to check whether at least two of them intersect with each ...</p>", "image": null, "date_modified": "2025-09-08T18:45:21+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/graph/depth-first-search.html", "url": "https://cp-algorithms.com/graph/depth-first-search.html", "title": "Depth First Search", "content_html": "<h1>Depth First Search</h1>\n<p>Depth First Search is one of the main graph algorithms.</p>\n<p>Depth First Search finds the lexicographical first path in the graph from a so...</p>", "image": null, "date_modified": "2025-08-27T05:43:56+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/string/z-function.html", "url": "https://cp-algorithms.com/string/z-function.html", "title": "Z-function", "content_html": "<h1>Z-function and its calculation</h1>\n<p>Suppose we are given a string $s$ of length $n$. The <strong>Z-function</strong> for this string is an array of length $n$ where the $i$...</p>", "image": null, "date_modified": "2025-08-25T18:21:57+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/graph/bridge-searching.html", "url": "https://cp-algorithms.com/graph/bridge-searching.html", "title": "Finding Bridges in O(N+M)", "content_html": "<h1>Finding bridges in a graph in $O(N+M)$</h1>\n<p>We are given an undirected graph. A bridge is defined as an edge which, when removed, makes the graph disconnected ...</p>", "image": null, "date_modified": "2025-08-25T17:30:05+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/point-in-convex-polygon.html", "url": "https://cp-algorithms.com/geometry/point-in-convex-polygon.html", "title": "Check if points belong to the convex polygon in O(log N)", "content_html": "<h1>Check if point belongs to the convex polygon in $O(\\log N)$</h1>\n<p>Consider the following problem: you are given a convex polygon with integer vertices and a lot...</p>", "image": null, "date_modified": "2025-08-25T17:16:53+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/navigation.html", "url": "https://cp-algorithms.com/navigation.html", "title": "Navigation", "content_html": "<ul>\n<li>Home<ul>\n<li><a href=\"index.md\">Main Page</a></li>\n<li><a href=\"navigation.md\">Navigation</a></li>\n<li><a href=\"tags.md\">Tag index</a></li>\n<li><a href=\"contrib.md\">How to Contribute</a></li>\n<li>[Code of conduct]...</li>\n</ul>\n</li>\n</ul>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/dynamic_programming/intro-to-dp.html", "url": "https://cp-algorithms.com/dynamic_programming/intro-to-dp.html", "title": "Introduction to Dynamic Programming", "content_html": "<h1>Introduction to Dynamic Programming</h1>\n<p>The essence of dynamic programming is to avoid repeated calculation. Often, dynamic programming problems are naturall...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/dynamic_programming/longest_increasing_subsequence.html", "url": "https://cp-algorithms.com/dynamic_programming/longest_increasing_subsequence.html", "title": "Longest increasing subsequence", "content_html": "<h1>Longest increasing subsequence</h1>\n<p>We are given an array with $n$ numbers: $a[0 \\dots n-1]$.\nThe task is to find the longest, strictly increasing, subsequence...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/sequences/longest_increasing_subsequence.html", "url": "https://cp-algorithms.com/sequences/longest_increasing_subsequence.html", "title": "Longest increasing subsequence", "content_html": "<p><meta http-equiv=\"refresh\" content=\"0; url=../dynamic_programming/longest_increasing_subsequence.html\"></p>\n<h1>Longest increasing subsequence</h1>\n<p>This article has bee...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/combinatorics/burnside.html", "url": "https://cp-algorithms.com/combinatorics/burnside.html", "title": "Burnside's lemma / P\u00f3lya enumeration theorem", "content_html": "<h1>Burnside's lemma / P\u00f3lya enumeration theorem</h1>\n<h2>Burnside's lemma</h2>\n<p><strong>Burnside's lemma</strong> was formulated and proven by <strong>Burnside</strong> in 1897, but historically...</p>", "image": null, "date_modified": "2025-08-24T17:06:02+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/enclosing-circle.html", "url": "https://cp-algorithms.com/geometry/enclosing-circle.html", "title": "Minimum Enclosing Circle", "content_html": "<h1>Minimum Enclosing Circle</h1>\n<p>Consider the following problem:</p>\n<p>!!! example \"[Library Checker - Minimum Enclosing Circle](https://judge.yosupo.jp/problem/minimu...</p>", "image": null, "date_modified": "2025-08-23T22:03:07+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/num_methods/binary_search.html", "url": "https://cp-algorithms.com/num_methods/binary_search.html", "title": "Binary Search", "content_html": "<h1>Binary search</h1>\n<p><strong>Binary search</strong> is a method that allows for quicker search of something by splitting the search interval into two. Its most common applica...</p>", "image": null, "date_modified": "2025-08-19T18:20:25+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/discrete-log.html", "url": "https://cp-algorithms.com/algebra/discrete-log.html", "title": "Discrete Log", "content_html": "<h1>Discrete Logarithm</h1>\n<p>The discrete logarithm is an integer $x$ satisfying the equation</p>\n<p>$$a^x \\equiv b \\pmod m$$</p>\n<p>for given integers $a$, $b$ and $m$.</p>\n<p>The d...</p>", "image": null, "date_modified": "2025-08-19T18:12:53+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/linear-diophantine-equation.html", "url": "https://cp-algorithms.com/algebra/linear-diophantine-equation.html", "title": "Linear Diophantine Equations", "content_html": "<h1>Linear Diophantine Equation</h1>\n<p>A Linear Diophantine Equation (in two variables) is an equation of the general form:</p>\n<p>$$ax + by = c$$</p>\n<p>where $a$, $b$, $c$ are...</p>", "image": null, "date_modified": "2025-08-15T21:04:35+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/manhattan-distance.html", "url": "https://cp-algorithms.com/geometry/manhattan-distance.html", "title": "Manhattan Distance", "content_html": "<h1>Manhattan Distance</h1>\n<h2>Definition</h2>\n<p>For points $p$ and $q$ on a plane, we can define the distance between them as the sum of the differences between their $...</p>", "image": null, "date_modified": "2025-08-11T08:42:20+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/data_structures/stack_queue_modification.html", "url": "https://cp-algorithms.com/data_structures/stack_queue_modification.html", "title": "Minimum Stack / Minimum Queue", "content_html": "<h1>Minimum stack / Minimum queue</h1>\n<p>In this article we will consider three problems: \nfirst we will modify a stack in a way that allows us to find the smallest ...</p>", "image": null, "date_modified": "2025-08-09T09:10:30+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/basic-geometry.html", "url": "https://cp-algorithms.com/geometry/basic-geometry.html", "title": "Basic Geometry", "content_html": "<h1>Basic Geometry</h1>\n<p>In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geome...</p>", "image": null, "date_modified": "2025-08-09T09:05:50+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/polynomial.html", "url": "https://cp-algorithms.com/algebra/polynomial.html", "title": "Operations on polynomials and series", "content_html": "<h1>Operations on polynomials and series</h1>\n<p>Problems in competitive programming, especially the ones involving enumeration some kind, are often solved by reducin...</p>", "image": null, "date_modified": "2025-08-07T06:04:38+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/linear_algebra/linear-system-gauss.html", "url": "https://cp-algorithms.com/linear_algebra/linear-system-gauss.html", "title": "Gauss & System of Linear Equations", "content_html": "<h1>Gauss method for solving system of linear equations</h1>\n<p>Given a system of $n$ linear algebraic equations (SLAE) with $m$ unknowns. You are asked to solve the ...</p>", "image": null, "date_modified": "2025-07-31T08:48:33+00:00", "authors": [], "tags": null}]}
1
+
{"version": "https://jsonfeed.org/version/1", "title": "Algorithms for Competitive Programming", "home_page_url": "https://cp-algorithms.com/", "feed_url": "https://cp-algorithms.com/feed_json_updated.json", "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.", "icon": null, "authors": [], "language": "en", "items": [{"id": "https://cp-algorithms.com/others/tortoise_and_hare.html", "url": "https://cp-algorithms.com/others/tortoise_and_hare.html", "title": "Tortoise and Hare Algorithm (Linked List cycle detection)", "content_html": "<h1>Floyd's Linked List Cycle Finding Algorithm</h1>\n<p>Given a linked list where the starting point of that linked list is denoted by <strong>head</strong>, and there may or may ...</p>", "image": null, "date_modified": "2025-09-10T06:08:27+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/intersecting_segments.html", "url": "https://cp-algorithms.com/geometry/intersecting_segments.html", "title": "Search for a pair of intersecting segments", "content_html": "<h1>Search for a pair of intersecting segments</h1>\n<p>Given $n$ line segments on the plane. It is required to check whether at least two of them intersect with each ...</p>", "image": null, "date_modified": "2025-09-08T18:45:21+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/graph/depth-first-search.html", "url": "https://cp-algorithms.com/graph/depth-first-search.html", "title": "Depth First Search", "content_html": "<h1>Depth First Search</h1>\n<p>Depth First Search is one of the main graph algorithms.</p>\n<p>Depth First Search finds the lexicographical first path in the graph from a so...</p>", "image": null, "date_modified": "2025-08-27T05:43:56+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/string/z-function.html", "url": "https://cp-algorithms.com/string/z-function.html", "title": "Z-function", "content_html": "<h1>Z-function and its calculation</h1>\n<p>Suppose we are given a string $s$ of length $n$. The <strong>Z-function</strong> for this string is an array of length $n$ where the $i$...</p>", "image": null, "date_modified": "2025-08-25T18:21:57+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/graph/bridge-searching.html", "url": "https://cp-algorithms.com/graph/bridge-searching.html", "title": "Finding Bridges in O(N+M)", "content_html": "<h1>Finding bridges in a graph in $O(N+M)$</h1>\n<p>We are given an undirected graph. A bridge is defined as an edge which, when removed, makes the graph disconnected ...</p>", "image": null, "date_modified": "2025-08-25T17:30:05+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/point-in-convex-polygon.html", "url": "https://cp-algorithms.com/geometry/point-in-convex-polygon.html", "title": "Check if points belong to the convex polygon in O(log N)", "content_html": "<h1>Check if point belongs to the convex polygon in $O(\\log N)$</h1>\n<p>Consider the following problem: you are given a convex polygon with integer vertices and a lot...</p>", "image": null, "date_modified": "2025-08-25T17:16:53+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/navigation.html", "url": "https://cp-algorithms.com/navigation.html", "title": "Navigation", "content_html": "<ul>\n<li>Home<ul>\n<li><a href=\"index.md\">Main Page</a></li>\n<li><a href=\"navigation.md\">Navigation</a></li>\n<li><a href=\"tags.md\">Tag index</a></li>\n<li><a href=\"contrib.md\">How to Contribute</a></li>\n<li>[Code of conduct]...</li>\n</ul>\n</li>\n</ul>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/dynamic_programming/intro-to-dp.html", "url": "https://cp-algorithms.com/dynamic_programming/intro-to-dp.html", "title": "Introduction to Dynamic Programming", "content_html": "<h1>Introduction to Dynamic Programming</h1>\n<p>The essence of dynamic programming is to avoid repeated calculation. Often, dynamic programming problems are naturall...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/dynamic_programming/longest_increasing_subsequence.html", "url": "https://cp-algorithms.com/dynamic_programming/longest_increasing_subsequence.html", "title": "Longest increasing subsequence", "content_html": "<h1>Longest increasing subsequence</h1>\n<p>We are given an array with $n$ numbers: $a[0 \\dots n-1]$.\nThe task is to find the longest, strictly increasing, subsequence...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/sequences/longest_increasing_subsequence.html", "url": "https://cp-algorithms.com/sequences/longest_increasing_subsequence.html", "title": "Longest increasing subsequence", "content_html": "<p><meta http-equiv=\"refresh\" content=\"0; url=../dynamic_programming/longest_increasing_subsequence.html\"></p>\n<h1>Longest increasing subsequence</h1>\n<p>This article has bee...</p>", "image": null, "date_modified": "2025-08-25T06:45:10+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/combinatorics/burnside.html", "url": "https://cp-algorithms.com/combinatorics/burnside.html", "title": "Burnside's lemma / P\u00f3lya enumeration theorem", "content_html": "<h1>Burnside's lemma / P\u00f3lya enumeration theorem</h1>\n<h2>Burnside's lemma</h2>\n<p><strong>Burnside's lemma</strong> was formulated and proven by <strong>Burnside</strong> in 1897, but historically...</p>", "image": null, "date_modified": "2025-08-24T17:06:02+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/enclosing-circle.html", "url": "https://cp-algorithms.com/geometry/enclosing-circle.html", "title": "Minimum Enclosing Circle", "content_html": "<h1>Minimum Enclosing Circle</h1>\n<p>Consider the following problem:</p>\n<p>!!! example \"[Library Checker - Minimum Enclosing Circle](https://judge.yosupo.jp/problem/minimu...</p>", "image": null, "date_modified": "2025-08-23T22:03:07+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/num_methods/binary_search.html", "url": "https://cp-algorithms.com/num_methods/binary_search.html", "title": "Binary Search", "content_html": "<h1>Binary search</h1>\n<p><strong>Binary search</strong> is a method that allows for quicker search of something by splitting the search interval into two. Its most common applica...</p>", "image": null, "date_modified": "2025-08-19T18:20:25+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/discrete-log.html", "url": "https://cp-algorithms.com/algebra/discrete-log.html", "title": "Discrete Log", "content_html": "<h1>Discrete Logarithm</h1>\n<p>The discrete logarithm is an integer $x$ satisfying the equation</p>\n<p>$$a^x \\equiv b \\pmod m$$</p>\n<p>for given integers $a$, $b$ and $m$.</p>\n<p>The d...</p>", "image": null, "date_modified": "2025-08-19T18:12:53+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/linear-diophantine-equation.html", "url": "https://cp-algorithms.com/algebra/linear-diophantine-equation.html", "title": "Linear Diophantine Equations", "content_html": "<h1>Linear Diophantine Equation</h1>\n<p>A Linear Diophantine Equation (in two variables) is an equation of the general form:</p>\n<p>$$ax + by = c$$</p>\n<p>where $a$, $b$, $c$ are...</p>", "image": null, "date_modified": "2025-08-15T21:04:35+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/manhattan-distance.html", "url": "https://cp-algorithms.com/geometry/manhattan-distance.html", "title": "Manhattan Distance", "content_html": "<h1>Manhattan Distance</h1>\n<h2>Definition</h2>\n<p>For points $p$ and $q$ on a plane, we can define the distance between them as the sum of the differences between their $...</p>", "image": null, "date_modified": "2025-08-11T08:42:20+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/data_structures/stack_queue_modification.html", "url": "https://cp-algorithms.com/data_structures/stack_queue_modification.html", "title": "Minimum Stack / Minimum Queue", "content_html": "<h1>Minimum stack / Minimum queue</h1>\n<p>In this article we will consider three problems: \nfirst we will modify a stack in a way that allows us to find the smallest ...</p>", "image": null, "date_modified": "2025-08-09T09:10:30+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/geometry/basic-geometry.html", "url": "https://cp-algorithms.com/geometry/basic-geometry.html", "title": "Basic Geometry", "content_html": "<h1>Basic Geometry</h1>\n<p>In this article we will consider basic operations on points in Euclidean space which maintains the foundation of the whole analytical geome...</p>", "image": null, "date_modified": "2025-08-09T09:05:50+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/algebra/polynomial.html", "url": "https://cp-algorithms.com/algebra/polynomial.html", "title": "Operations on polynomials and series", "content_html": "<h1>Operations on polynomials and series</h1>\n<p>Problems in competitive programming, especially the ones involving enumeration some kind, are often solved by reducin...</p>", "image": null, "date_modified": "2025-08-07T06:04:38+00:00", "authors": [], "tags": null}, {"id": "https://cp-algorithms.com/linear_algebra/linear-system-gauss.html", "url": "https://cp-algorithms.com/linear_algebra/linear-system-gauss.html", "title": "Gauss & System of Linear Equations", "content_html": "<h1>Gauss method for solving system of linear equations</h1>\n<p>Given a system of $n$ linear algebraic equations (SLAE) with $m$ unknowns. You are asked to solve the ...</p>", "image": null, "date_modified": "2025-07-31T08:48:33+00:00", "authors": [], "tags": null}]}