## Find smallest number K such that K % p = 0 and q % K = 0

Given two integers p and q, the task is to find the smallest number K such that K % p = 0 and q %… Read More »

- Count total number of even sum sequences
- Minimum cost to convert str1 to str2 with the given operations
- Minimum halls required for class scheduling
- Find numbers which are multiples of first array and factors of second array
- Find the minimum value of X for an expression
- Minimum steps required to reduce all the elements of the array to zero
- Minimum length String with Sum of the alphabetical values of the characters equal to N
- Random list of M non-negative integers whose sum is N

Given two integers p and q, the task is to find the smallest number K such that K % p = 0 and q %… Read More »

Given an array arr[] of N positive integers, the task is to find the minimum LCM and GCD between elements of all possible sub-array. Examples:… Read More »

Given a string S of length N. The task is to find the minimum number of steps required on strings, so that it has exactly… Read More »

Given a grid N x M size and initial position (X, Y) and a series of K moves. Each move contains 2 integers Dx and… Read More »

Given two arrays A1 and A2 of N numbers. There are two people A and B who select numbers out of N. If A selects… Read More »

Given an array arr[], the task is to find the minimum number of elements that must be removed to make the array good. A sequence… Read More »

There are N distinct integers arranged on a circle. The distance between any two adjacent numbers is 1. The task is to travel on this… Read More »

Given an array of N integers. The task is to eliminate the minimum number of elements such that in the resulting array the sum of… Read More »

Given an integer N, the task is to count all possible N digit numbers such that A + reverse(A) = 10N – 1 where A… Read More »

Given an array arr[] and an integer k, we can cut this array at k different positions where k[] stores the positions of all the… Read More »

Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval… Read More »

Given two segments [L1, R1] and [L2, R2], the task is to choose two elements x and y from both the ranges (one from range… Read More »

Given an array arr[] of integers. The task is to return the length of the maximum size sub-array such that either one of the condition… Read More »

Given a string str and an integer k. The task is to count the occurrences of sub-strings of length k that consist of the same… Read More »

Given two integers N and M which denote the number of persons of Type1 and Type2 respectively. The task is to find the maximum number… Read More »