Count minimum number of moves to front or end to sort an array
Given an array arr[] of size N, the task is to find the minimum moves to the beginning or end of the array required to… Read More »
Given an array arr[] of size N, the task is to find the minimum moves to the beginning or end of the array required to… Read More »
Given an array, arr[] consisting of N positive integers, the task is to make the array non-decreasing by swapping pairs (arr[i], arr[j]) such that i… Read More »
Given an integer N and set of all non-negative powers of N as S = {N0, N1, N2, N3, … }, arrange all non-empty subsets… Read More »
Given an array arr[] of N positive integers and an integer K, the task is to find the maximum distinct prime factors in a subarray… Read More »
Given three integers N, P, and K, the task is to find the total number of ways to divide N into K integers having sum… Read More »
Given two integers A, B which are any two terms of an Arithmetic Progression series, and an integer N, the task is to to construct… Read More »
Given an array, arr[] of size N, two positive integers K and S, the task is to find the length of the smallest subarray of… Read More »
Given two strings str1 and str2, the task is to count the minimum number of operations of the following three types on one of the… Read More »
Given an integer N, the task is to count the total number of ordered pairs such that the LCM of each pair is equal to… Read More »
Given an array arr[], where each element represents the maximum number of steps that can be made forward from that element, the task is to… Read More »
Given an array arr[] consisting of N integers, the task is to find the length of the longest increasing absolute even subsequence. An increasing absolute… Read More »
Given a binary array arr[] of size N, remove at most N/2 elements from the array such that the sum of elements at odd and… Read More »
Given an array arr[] of N integers and an integer K, the task is to find a subarray of length K with sum of elements… Read More »
John is a geologist, and he needs to count rock samples in order to send it to a chemical laboratory. He has a problem. The… Read More »
Given an array arr[] consisting of N integers, the task is to find the minimum length of the prefix needed to be deleted such that… Read More »