## Number of ways N can be divided into four parts to construct a rectangle

Given an integer N, the task is to divide the number into four parts such that the divided parts can be used to construct a… Read More »

- Count substrings that contain all vowels | SET 2
- Given two arrays count all pairs whose sum is an odd number
- Minimum number of adjacent swaps to convert a string into its given anagram
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Maximum water that can be stored between two buildings
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Minimum sum of two numbers formed from digits of an array in O(n)
- Count pairs in an array such that the absolute difference between them is ≥ K
- Swap characters in a String
- Program to print an array in Pendulum Arrangement with constant space
- Sort the Queue using Recursion
- Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k
- Find if it is possible to make a binary string which contanins given number of "0", "1" , "01" and "10" as sub sequences
- Convert an unbalanced bracket sequence to a balanced sequence
- Maximum distance between two unequal elements
- Print combinations of distinct numbers which add up to give sum N
- Maximum length sub-array which satisfies the given conditions
- Number of balanced parenthesis substrings
- Minimum cost to make all array elements equal
- 21 Matchsticks Problem
- Check if string can be made lexicographically smaller by reversing any substring
- Rearrange the array to maximize the number of primes in prefix sum of the array
- Queries to check whether all the elements can be made positive by flipping signs exactly K times
- Find if a binary matrix exists with given row and column sums
- Find a sequence of N prime numbers whose sum is a composite number
- Remove Minimum coins such that absolute difference between any two piles is less than K
- Count the number of elements which are greater than any of element on right side of an array
- Find the number of cells in the table contains X
- Check whether an array can be made strictly increasing by modifying atmost one element

Given an integer N, the task is to divide the number into four parts such that the divided parts can be used to construct a… Read More »

Given a list of integers from the range [1, N] with some of the elements missing. The task is to find the missing elements. Note… Read More »

Given two arrays A[] and B[] and two integers X and Y, the task is to choose X elements from A[] and Y elements from… Read More »

Given an array arr[] of N positive integers. The task is to find the index of the elements which are equal to the sum of… Read More »

Given an integer N, the task is to reduce N to 1 with the following two operations: 1 can be subtracted from each of the… Read More »

Given two strings of equal lengths str1 and str2 consisting of characters ‘a’ and ‘b’ only. The followig operations can be performed on str1: Any… Read More »

Given a string str and the task is to modify the string such that no three consecutive characters are same. In a single operation, any… Read More »

Given an array arr[] consisting of N positive integers, the task is to make all values of this array equal to some integer value with… Read More »

Given an unbalanced bracket sequence as a string str, the task is to find whether the given string can be balanced by moving at most… Read More »

Given string str, the task is to find the length of the longest substring of str such that no three consecutive characters in the substring… Read More »

Given an array arr[] of N integers, the task is to find the count of subarrays with negative product. Examples: Input: arr[] = {-1, 2,… Read More »

Given an array arr[] of N integers. The task is to find the sum of elements till the smallest index such that there are no… Read More »

Given an array Arr[]. The task is to count the number of elements Arr[i] in the given array such that one or more smaller elements… Read More »

Given an integer N, the task is to print the first N terms whose sum of digits is a multiple of 10. First few terms… Read More »

Given an unbalanced bracket sequence of ‘(‘ and ‘)’, convert it into a balanced sequence by adding the minimum number of ‘(‘ at the beginning… Read More »