Category Archives: Competitive Programming

Given a string str of lowercase alphabets, the task is to remove minimum characters from the given string so that string can be break into… Read More
Given an array arr[] of size N, the task is to find the number of times the array can be partitioned repetitively into two subarrays… Read More
Given a starting string X of 3 characters, finishing string Y of 3 characters and an array of forbidden strings. The task is to find… Read More
Given a number N and an integer S, the task is to create an array of N integers such that sum of all elements equals… Read More
Given two N-digit prime numbers A and B, the task is to find the minimum number of steps taken to convert A to B. Condition… Read More
Given an integer N, the task is to find the N-th Fibonacci numbers. Examples: Input: N = 3 Output: 2 Explanation: F(1) = 1, F(2)… Read More
Given a string consisting of the first N distinct alphabets, the task is to sort the string by using at most N/2 moves. Each move… Read More
Given a number N, the task is to find the minimum number of operations required to reduce the number N to zero by subtracting the… Read More
Given a grid of size N*M consists of 0 and 1 only, the task is to find the length of longest connected 1s in the… Read More
Given an array arr[] of N positive integers and two positive integers S and K, the task is to reach the position of the array… Read More
Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s… Read More
Given an array arr[] of integers of size N, the task is to find the products of all subarrays of the array. Examples: Input: arr[]… Read More
Given a positive integer N, the task is to find the total number of distinct power of prime factor of the given number N. Examples:… Read More