Given a (n,n) 2D matrix and a total cost to reach the destination cell, we need to start from (0,0) cell and go till (n-1,n-1) cell. Assuming that each cell has a cost associated and we can only go right or down from current cell. Find the number of ways to reach destination cell with given total cost.
Given a (n,n) 2D matrix, we need to start from **(0,0)** cell and go till (n-1, n-1) cell. Assuming that each cell has a cost associated and we can only go right or down from current cell, find the traversal in minimum cost.
Palindrome is a string that reads the same backwards as well as forward and can be odd or even length.
Given N, count the number of ways to express N as sum of 1,3 and 4.
Palindrome is a string that reads the same backwards as well as forward and can be odd or even length.
There are N houses built in a line, each containing some value. A thief is going to steal the maximum value from these houses. However, he can't steal in 2 adjacent houses. What is the maximum stolen value?
Given strings s1 and s2, convert s2 into s1 by deleting, inserting or replacing characters. Find out the minimum number of edit operations.
Quick sort is a Divide & Conquer algorithm. At each step, it finds the Pivot and then makes sure that all the smaller elements are left of Pivot and all larger elements are on the right. It continues to do so recursively until the entire array is sorted
Merge sort is a Divide & Conquer algorithm. It divides the input array into 2 halves, and recursively breaks those halves until they become so small that it can't be broken further. Then, each section of the pieces are merged together to inch towards the final answer.
Given the weights and profits of N items, we are asked to put these items in a knapsack which as a capacity C.
Divide & Conquer algorithm can be used to solve Longest Common Subsequence problem . Let's explore how it works below.