Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Dynamic Programming LIS subsequence

Construction of Longest Increasing Subsequence using Dynamic Programming

The longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are so...
Dynamic Programming Dynamic Programming

Bitmasking and Dynamic Programming Set 1 (Count ways to assign unique cap to every person)

Consider the below problems statement. There are 100 different types of caps each having a unique id from 1 to 100. Also, there are ‘n’ persons each hav...
Dynamic Programming LIS Dynamic Programming

Dynamic Programming Building Bridges

Consider a 2-D map with a horizontal river passing through its center. There are n cities on the southern bank with x-coordinates a(1) … a(n) and n cities on t...
Advanced Data Structure Algorithms Dynamic Programming

Dynamic Programming on Trees Set-1

Dynamic Programming(DP) is a technique to solve problems by breaking them down into overlapping sub-problems which follows the optimal substructure. There are various...
Advanced Data Structure Algorithms Dynamic Programming

Dynamic Programming on Trees Set 2

Given a tree with N nodes and N-1 edges, find out the maximum height of tree when any node in the tree is considered as the root of the tree. The above diagram repr...
Bit Magic Dynamic Programming Graph

Travelling Salesman Problem Set 1 (Naive and Dynamic Programming)

Travelling Salesman Problem (TSP): Given a set of cities and distance between every pair of cities, the problem is to find the shortest possible route that visits ev...
Dynamic Programming Mathematical binomial coefficient

Compute nCr % p Set 1 (Introduction and Dynamic Programming Solution)

Given three numbers n, r and p, compute value of nCr mod p. Example: Input: n = 10, r = 2, p = 13 Output: 6 Explanation: 10C2 is 45 and 45 % 13 is 6. We strongly ...
Sorting Insertion Sort Merge Sort

Know Your Sorting Algorithm Set 1 (Sorting Weapons used by Programming Languages)

Ever wondered how sort() function we use in C++/Java or sorted() in Python work internally? Here is a list of all the inbuilt sorting algorithms of different programm...
Competitive Programming Dynamic Programming Pattern Searching

Dynamic Programming Wildcard Pattern Matching Linear Time and Constant Space

Given a text and a wildcard pattern, find if wildcard pattern is matched with text. The matching should cover the entire text (not partial text). The wildcard patter...
Advanced Data Structure Combinatorial Competitive Programming

Inclusion Exclusion principle and programming applications

Sum Rule – If a task can be done in one of ways or one of ways, where none of the set of ways is the same as any of the set of ways, then there are ways ...

Subscribe to Our Newsletter