Skip to content

Category Archives: Competitive Programming

Given an array arr[] of N integers, the task is to delete the element from the given array if element to it’s left is smaller… Read More
Given an unsorted array arr[] having N elements, the task is to find out the median of the array in linear time complexity. Examples: Input:… Read More
Given a positive integer N, the task is to find the average of cubes of first N natural numbers. Examples:   Input: N = 2 Output: 4.5 Explanation: For integer… Read More
Given string str of the lowercase alphabet and an integer K, the task is to count all substrings of length K which have exactly K… Read More
Given an array arr[] of positive integers of size N and a positive integer K, the task is to find the maximum possible length of… Read More
Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target… Read More
Pre-requisite: Merge Sort, Insertion Sort Merge Sort: is an external algorithm and based on divide and conquer strategy. In this sorting: The elements are split… Read More
Given two strings A and B, the task is to split the string A into the minimum number of substrings such that each substring is… Read More
Pre-requisite: Policy based data structure Given an array arr[], the task is to find the number of inversions for each element of the array. Inversion… Read More
Given a number N, the task is to calculate the total number of corresponding different bit in the binary representation for every consecutive number from… Read More
Given an array arr[], the task is to find the sum of decomposition value of the suffixes subarray.Decomposition Value: Decomposition value of a subarray is… Read More
Content Removed. Please refer Matrix Category for such problems.t My Personal Notes arrow_drop_up Save
Given 5 integers say A, B, C, D, and E which represents the cubic equation , the task is to find the integral solution for this… Read More
Given an array arr[] of size N which contains the permutations of the N natural numbers, the task is to sort the permutations of N… Read More