## Check if a string contains a palindromic sub-string of even length

S is string containing only lowercase English alphabets. We need to find if there exists at least one palindromic sub-string whose length is even. Examples:… Read More »

## Remove elements from the array which appear more than k times

Given an array of integers, remove all the occurrences of those elements which appear strictly more than k times in the array. Examples: Input :… Read More »

## Largest factor of a given number which is a perfect square

Given a number . The task is to find the largest factor of that number which is a perfect square. Examples: Input : N =… Read More »

## Program to make Indian Flag in Python | Step by Step

Here, We’ll be making Indian Flag in Python using Spyder tool which is a part of Anaconda interface. It is the beginner’s practice problem for… Read More »

## Lexicographically largest string formed from the characters in range L and R

Given a string S and a range L and R, the task is to print the lexicographically largest string that can be formed from the… Read More »

## Tree with N nodes and K leaves such that distance between farthest leaves is minimized

Given N and K, print a tree such that the tree has no more than K leaf nodes and every other node has at least… Read More »

## N-th character in the string made by concatenating natural numbers

Given an integer N, the task is to find the N-th character in the string made by concatenating natural numbers (Integers beginning from 1). The… Read More »

## Range queries to count 1s in a subarray after flip operations

Given an array ‘arr’ all the numbers of which are initialized to ‘0’ then the array can be updated at any time in the following… Read More »

## Absolute difference between the Product of Non-Prime numbers and Prime numbers of an Array

Given an array of positive numbers, the task is to calculate the absolute difference between product of non-prime numbers and prime numbers. Note: 1 is… Read More »

## Reduce the string by removing K consecutive identical characters

Given a string ‘str’ and an integer ‘k’, the task is to reduce the string by applying the following operation: Choose a group of ‘k’… Read More »

## Absolute Difference between the Sum of Non-Prime numbers and Prime numbers of an Array

Given an array of positive numbers, the task is to calculate the absolute difference between sum of non-prime numbers and prime numbers. Note: 1 is… Read More »

## Count number of substrings with numeric value greater than X

Given a string ‘S’ (composed of digits) and an integer ‘X”, the task is to count all the sub-strings of ‘S’ that satisfy the following… Read More »

## Number of squares of side length required to cover an N*M rectangle

Given three numbers , , . Find Number of squares of dimension required to cover rectangle. Note: It’s allowed to cover the surface larger than… Read More »

## Maximum count of equal numbers in an array after performing given operations

Given an array of integers. The task is to find the maximum count of equal numbers in an array after applying the given operation any… Read More »

## Count numbers whose XOR with N is equal to OR with N

Given a number N, the task is to find the count of X such that N XOR X == N OR X, where 0<=X<=N Examples:… Read More »