Skip to content

Category Archives: Competitive Programming

Given an array arr[] with N elements, the task is to find out the longest sub-array which has the shape of a mountain. A mountain… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Armstrong number of elements… Read More
Given an array arr consisting of N elements and Q queries of the following two types: 1 K: For this type of query, the array… Read More
Given a complete binary tree with N levels numbered [0, (N – 1 )] from root to the lowest level in decreasing order and having… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  query(start, end): Print the number of perfect square numbers… Read More
We generally study most of the algorithmic techniques in academics like Searching, Sorting, Dynamic Programming, Greedy Algorithms, Divide and Conquer, Backtracking, etc. But below techniques… Read More
Given two numbers N and K, the task is to split this number into K positive integers such that their sum is equal to N… Read More
Given an integer N, the task is to find the number of perfect squares of length N. Examples: Input: N = 1 Output: 3 Explanation:… Read More
Given a binary string str, the task is to calculate the maximum possible splits possible to make each substring divisible by a given odd number… Read More
Given two integers N and K, the task is to represent N as sum of K even number. If it is not possible to represent… Read More
Given an array arr[] and an integer K, the task is to find the maximum for each and every contiguous subarray of size K. Examples: … Read More
Given a Binary Tree, the task is to find the maximum of all the XOR value of all the nodes in the path from the… Read More
Given an array arr[] of N integers, the task is to perform the following two queries: query(L, R): Print the number of Even Parity numbers… Read More
Given an array arr[] of N integers, the task is to perform the following two queries:  maximum(start, end): Print the maximum Fibonacci number of elements… Read More