## Minimum number of moves after which there exists a 3X3 coloured square

Given an N * N board which is initially empty and a sequence of queries, each query consists of two integers X and Y where… Read More »

- Minimum number of swaps required to sort an array | Set 2
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Print all pairs in an unsorted array with equal sum
- Minimum cost path from source node to destination node via an intermediate node
- Check if a triplet with given sum exists in BST
- Lowest Common Ancestor in Parent Array Representation
- Count subarrays with Prime sum
- Perform the given queries on the rooted tree
- Find the missing elements from 1 to M in given N ranges | Set-2
- Delete array element in given index range [L - R]
- Minimum number of days required to complete the work
- Rearrange all elements of array which are multiples of x in decreasing order
- Count the number of elements in an array which are divisible by k
- Difference between std::swap and std::vector::swap
- Print levels with odd number of nodes and even number of nodes
- Find the k-th smallest divisor of a natural number N
- Sort perfect squares in an array at their relative positions
- Sorting array elements with set bits equal to K
- Find four factors of N with maximum product and sum equal to N
- Get first and last elements from Array and Vector in CPP
- Count elements in a vector that match a target value or condition
- Minimum operation require to make first and last character same
- Minimum number of moves after which there exists a 3X3 coloured square
- Swapping of subranges from different containers in C++
- Number of Co-prime pairs obtained from the sum of digits of elements in the given range

Given an N * N board which is initially empty and a sequence of queries, each query consists of two integers X and Y where… Read More »

Given an array of integers (both odd and even), the task is to arrange them in such a way that odd and even values come… Read More »

Given a Binary Search Tree and a SUM. The task is to check if there exists any triplet(group of 3 elements) in the given BST… Read More »

Given an array of integers arr[] and an integer x, the task is to sort all the elements of the array which are multiples of… Read More »

Given an N-ary tree, print all the levels with odd and even number of nodes in it. Examples: For example consider the following tree 1… Read More »

Given an integer array , the task is to sort only the elements which are perfect squares at their relative positions in the array (positions… Read More »

Given an integer and ranges (e.g. [a, b]) which are intersecting and overlapping. The task is to find all the number within the range that… Read More »

Given an unsorted array A[]. The task is to print all unique pairs in the unsorted array with equal sum. Note: Print the result in… Read More »

Given an array A[] of integers. The task is to count total subarrays whose sum is prime with ( size > 1 ). Examples: Input… Read More »

Given an array of integers. The task is to calculate the count of a number of elements which are divisible by a given number k.… Read More »

Given an array of integers and a number . The task is to sort only those elements of the array whose total set bits are… Read More »

To determine number of integers in a vector that matches a particular value. We use count in C++ STL filter_none edit close play_arrow link brightness_4… Read More »

A container is a holder object that holds a collection of other objects. They are implemented as class templates, which allows a great flexibility in… Read More »

Given an array, find first and last elements of it. Input: {4, 5, 7, 13, 25, 65, 98} Output: First element: 4 Last element: 98… Read More »

Given a rooted tree and not necessarily binary. The tree contains N nodes, labeled 1 to N. You are given the tree in the form… Read More »