Check if a subarray of size K exists whose elements form a number divisible by 3
Given an array arr[], of size N and a positive integer K, the task is to find a subarray of size K whose elements can… Read More »
Given an array arr[], of size N and a positive integer K, the task is to find a subarray of size K whose elements can… Read More »
Given an array arr[] of size N, the task is to check if an array can be sorted by swapping only the elements whose GCD… Read More »
Priority Queue is an extension of the queue with the following properties: Every item has a priority associated with it. An element with high priority… Read More »
Given three integers L, R and K where [L, R] denotes the range of elements, the task is to find the element in the range… Read More »
Given an array, arr[] of size N consisting of elements from the range [1, N], that represents the order, in which the elements are inserted… Read More »
Given a stack of integers S and an array of integers arr[], the task is to check if all the array elements are present in… Read More »
Given an array arr[] consisting of N integers, the task is to check if any permutation of the array elements exists where the sum of… Read More »
Given an array arr[] of size N, the task is to find the sum of all products of ordered pairs that can be generated from… Read More »
Given an array arr[] of N integers and Q queries of the form {X, Y} of the following two types: If X = 1, rotate… Read More »
Given an array arr[] consisting of N integers, the task is to find the length of the longest subsequence than forms an Arithmetic Progression. Examples:… Read More »
Given an array arr[] consisting of N integers, the task is to maximize the resultant sum obtained after adding remaining elements after every removal of… Read More »
Given an array arr[] consisting of six integer digits only, the task is to return the maximum time in a 24-hour format that can be… Read More »
Given a binary tree and an integer K, the task is to find the K smallest leaf nodes from the given binary tree. The number… Read More »
Given an array arr[] consisting of N positive integers, the task is to find the length of the longest increasing subsequence consisting of Prime Numbers… Read More »
Given an integer N and two arrays F[] and C[] of size K that represent the first K terms and coefficient of first K terms… Read More »