Minimum Cost Path in Matrix
In a matrix you have to find the minimum cost path to reach the last cell from the first one, meaning that starting from the top left...
In a matrix you have to find the minimum cost path to reach the last cell from the first one, meaning that starting from the top left...
Having a given polygon, divide it using triangulation between all points, having the minimum cost. This means that we have to divide the...
The maximum length chain of pairs is a variation of the longest increasing subsequence problem. We have to find the pairs of numbers that...
Using this algorithm we can find the longest increasing subsequence from a given array. This means that we will find the numbers that are...
Having two strings, you have to find the longest common subsequence. This means that you have to find how many letters are found in both...
This algorithm is used to find the shortest path between all pairs of vertices, including negative edges. // Floyd-Warshall Shortest...
Using a grid of cells that hold values, try to find the maximum number of points that can be summed by using two traversals. The first...
The Fibonacci series is a sequence of numbers where one item is the sum of the previous two numbers. The first 2 numbers are 0 and 1, so...
The box stacking problem is a variation of the Longest Increasing Subsequence problem. The statement is that we are given n types of...
A spanning tree is a subgraph of an existing graph that is a tree and connects all the nodes. There can be many spanning trees in a...
A spanning tree is a subgraph of an existing graph that is a tree and connects all the nodes. There can be many spanning trees in a...
An algorithm to find the minimum number of coins / banknotes for a specific value. // Number of coins #include <bits/stdc++.h> using...
Using this algorithm, we find the shortest path from a node to all the other nodes in a weighted directed graph. It works with negative...
Huffman’s Coding algorithms is used for compression of data so that it doesn’t lose any information. Each symbol is converted into a...
Dijkstra’s Shortest Path Algorithm is used to find the shortest path in a graph, from one node to every other node in a graph. Start with...
Shell sort is a sorting algorithm that uses a gap between elements to compare the values. The gap between elements shrinks until is 0 and...
Quick sort is a recursive sorting algorithm. It uses the idea of divide et conquer. To solve the array, we have to choose a pivot, which...
Pigeonhole is a sorting algorithm. It works best if the number of elements in the array and the number of keys is similar. It is a...
Merge Sort is a Divide and Conquer Algorithm. It continuously divides in 2 the array, and then each divided part and so on until we have...
Insertion Sort algorithm is a sorting technique that arranges elements in an array. Many people compare it to the way that we sort...