Category Archives: Competitive Programming

Given string str, the task is to check if characters at the odd indexes of str form a palindrome string or not. If not then… Read More
Given two permutations P1 and P2 of numbers from 1 to N, the task is to find the maximum count of corresponding same elements in… Read More
Given an integer array arr[] and Q queries, the task is to find the sum of the array for each query of the following type: … Read More
Given an array arr[] of N elements and Q queries of the form [X]. For each query, the task is to find the largest interval… Read More
Given an array of integers arr[], the task is to count the minimum number of changes required to convert each array element to its nearest… Read More
Given two integers L and R, the task is to find the count of total numbers of prime numbers in the range [L, R] whose… Read More
Given a binary tree of N nodes, the task is to print level order traversal in a spiral form. In spiral form, nodes at the… Read More
Given an integer N, the task is to find the total number of ways to distribute N among 3 people such that: Exactly one person… Read More
Given two arrays arr1[] and arr2[]. The array arr1[] is sorted. The task is to print the change in the median after removing each element… Read More
Given an array arr[] of N positive integers. The task is to find the number of pairs whose Bitwise AND value is a power of… Read More
Given three integer N, K and X, the task is to create an array of length N suach that sum of all its K-length subarrays… Read More
Given a matrix A[][] of dimensions N*M, the task is to find the minimum number of moves required to traverse the entire matrix starting from… Read More
Given an array arr[] of N integers, the task is to count number of triplets (i, j, k) in the array such that a[k] <… Read More
Given a matrix A[][] of size N*M, the task is to check if the given matrix satisfies the following two conditions or not: Sum of… Read More