
Search the subarray with the maximum/minimum sum
Here, we consider the problem of finding a subarray with maximum sum, as well as some of its variations (including the algorithm for solving this […]
Here, we consider the problem of finding a subarray with maximum sum, as well as some of its variations (including the algorithm for solving this […]
MPM (Malhotra, Pramodh-Kumar and Maheshwari) algorithm solves the maximum flow problem in $O(V^3)$. This algorithm is similar to Dinic’s algorithm. 1. Algorithm Like Dinic’s algorithm, MPM […]
Dinic’s algorithm solves the maximum flow problem in $O(V^2E)$. The maximum flow problem is defined in this article Maximum flow – Ford-Fulkerson and Edmonds-Karp. This algorithm […]
We will modify the push-relabel method to achieve a better runtime. 1. Description The modification is extremely simple: In the previous article we chosen a vertex with […]
The push-relabel algorithm (or also known as preflow-push algorithm) is an algorithm for computing the maximum flow of a flow network. The exact definition of […]
The Edmonds-Karp algorithm is an implementation of the Ford-Fulkerson method for computing a maximal flow in a flow network. 1. Flow network First let’s define […]
Emuskald was hired to design an artificial waterfall according to the latest trends in landscape architecture. A modern artificial waterfall consists of multiple horizontal panels […]
Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x 1, x 2, …, x k (k > 1) is such maximum element x j, that […]