## Length of longest common subsequence containing vowels

Given two strings X and Y of length m and n respectively. The problem is to find the length of the longest common subsequence of… Read More »

- Check if a word exists in a grid or not
- Sum of XOR of all subarrays
- Minimum steps to reach any of the boundary edges of a matrix | Set 1
- Longest subsequence such that adjacent elements have at least one common digit
- Make Binary Search Tree
- Samsung Interview Experience through Co-cubes (2019)
- Optimal Strategy for a Game | Set 2
- Minimum distance to the end of a grid from source
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Double Knapsack | Dynamic Programming
- Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
- Longest path in a directed Acyclic graph | Dynamic Programming
- A variation of Rat in a Maze : multiple steps or jumps allowed
- Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
- Maximum subarray sum by flipping signs of at most K array elements
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Count of Numbers in Range where first digit is equal to last digit of the number
- Bellman Ford Algorithm (Simple Implementation)
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Find sub-matrix with the given sum
- Maximum sum such that no two elements are adjacent | Set 2
- Minimum steps to delete a string by deleting substring comprising of same characters
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Count number of ways to reach a given score in a Matrix
- Count of sub-sets of size n with total element sum divisible by 3
- DP on Trees | Set-3 ( Diameter of N-ary Tree )
- Sum of bitwise AND of all submatrices
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Number of Binary Strings of length N with K adjacent Set Bits

Given two strings X and Y of length m and n respectively. The problem is to find the length of the longest common subsequence of… Read More »

TL;DR In this article I’m trying to explain the difference/similarities between dynamic programing and divide and conquer approaches based on two examples: binary search and… Read More »

Online Coding Round : Platform used was cocubes.com Time : 75 min Question : 3 Coding Question 1st Question : Simple linked list implementation. Given… Read More »

Given an integer n and an array of positions ‘position[]’ (1 <= length(position[]) <= 2n), find the number of ways of proper bracket expressions that… Read More »

Given a convex polygon with n+2 sides. The task is to calculate the number of ways in which triangles can be formed by connecting vertices… Read More »

Give a number N, print alternate fibonacci numbers till n-th Fibonacci. Examples: Input : N = 7 Output : 0 1 3 8 Input :… Read More »

Given a 2D matrix mat[][] and a value k. Find the largest rectangular sub-matrix whose sum is equal to k. Example: Input : mat =… Read More »

Given an integer N, the task is to find an aggregate sum of all integer partitions of this number such that each partition does not… Read More »

Given two jugs with the maximum capacity of m and n liters respectively. The jugs don’t have markings on them which can help us to… Read More »

Given two numbers A and B where 1 <= A <= B. The task is to count the number of pairs whose elements are co-prime… Read More »

Given two strings str1 and str2 and below operations that can be performed on str1. Find the minimum number of edits (operations) required to convert… Read More »

Given a Directed Acyclic Graph with n vertices and m edges. The task is to find the number of different paths that exist from a… Read More »

The tetranacci numbers are a generalization of the Fibonacci numbers defined by the recurrence relation T(n) = T(n-1) + T(n-2) + T(n-3) + T(n-4) with… Read More »

In number theory, a weird number is a natural number that is abundant but not semiperfect. In other words, the sum of the proper divisors… Read More »

In number theory, a semiperfect number or pseudoperfect number is a natural number n that is equal to the sum of all or some of… Read More »