The longest common subsequence algorithm is a problem to find the length of the longest subsequence common to all subsequences of two strings. The lcs algorithm differs from the algorithm of the longest common substring problem. Explore and Enjoy!
An array of non-negative integers is given and the aim is to reach the last index in the minimum number of jumps. You are initially positioned at the first index of the array and each element in the array represents your maximum jump length at that position.
If we want to make a change for a given value K of cents, and we have an infinite supply of each of coin[ ] = [C1, C2, …, Cm] valued coins, write a program to find the minimum number of coins required to make the change?
There is a staircase of n steps and you can climb either 1 or 2 steps at a time. You need to count and return the total number of unique ways to climb the staircase. The order of steps taken matters.
Given an array X with n elements, we need to write a program to find the largest contiguous subarray sum. A subarray of array X of length n is a contiguous segment from X[i] through X[j] where 0<= i <= j <= n. Kadane algorithm idea is intuitive, using a single loop and few variables to solve the problem. We can use a similar idea to solve other coding problems.
Subscribe to get free weekly content on data structure and algorithms, machine learning, system design, oops design and mathematics.