In mathematics, Pascal’s triangle is a triangular array of the binomial coefficients. It can also be viewed as: each number in Pascal’s triangle is the sum of the two numbers directly above it.
You are climbing a staircase. It has n steps upto the top. Each time you can either climb 1 step or 2 steps. You’ve to find the number of ways to climb the stair.
Huffman codes are a widely used technique for compressing data. Huffman codes is a greedy algorithm to build up an optimal way of representing each character as a binary string. Suppose we have a 10,000 character data file that we wish to store. And we observe a character ‘a’ occurs very frequently.
You are given an array of non-negative integers, you have to find the number of subsets having sum equal to the given sum. Subset needs not to be contiguous.
We are given a sequence (chain) (M1, M2, M3…Mn) of n matrices to be multiplied and we need to find the most efficient way to multiply these matrices together.
The longest common subsequence (LCS) problem is the problem of finding the longest subsequence common to given two sequences. LCS problem is used to determine how similar the two DNA strands are.
Given an integer array arr, return the length of the longest strictly increasing subsequence. Strictly increasing sequence is a sequence such that all elements of the sequence are sorted in increasing order.