Skip to content

Category Archives: Algorithms

 Given an array arr[] of size N, the task is to count the minimum number of elements required to be removed from the given array… Read More
Given an array arr[] of N integers, the task is to divide find all the indices such that prefix sum (i.e. sum of elements in… Read More
Given an array arr[] of size N (multiple of 8) where the values in the array will be in the range [a, (a+8*N) -1] (a… Read More
Given an array arr[] containing N integers and an integer K, the task is to minimize the subset-sum difference after removing K elements from the… Read More
Given a binary string str of size N containing 0 and 1 only, the task is to count all possible distinct binary strings when a… Read More
Given an array arr[] of size N, and integers K and D, consisting of breakpoints in journey, the task is to find the distance covered… Read More
Given an array A[] of N integers. Check if there exist 2 distinct sub-sequences X and Y of the given array, such that the sum… Read More
Given an integer N, the task is to generate a permutation from 1 to N such that the bitwise XOR of differences between adjacent elements… Read More
Given an integer N, the task is to generate an array of N distinct integers. Such that the GCD of all the elements of the… Read More
Given an array A of N integers, where: Each element of array represents the bit size of an imaginary unsigned integer datatype. If ith imaginary… Read More
Given two strings A and B that are anagrams of each other, the task is to convert A to B if possible in minimum number… Read More
Given an array arr[] of size N, the task is to find minimum number of steps required to reduce all Array elements to 0 except… Read More
Given an array of strings Arr[]. The task is to sort them in lexicographic order. Examples: Input: Arr[] = {“sort”, “this”, “list”}Output:  [list, sort, this]… Read More
Given a sorted array arr[] consisting of N integers without any duplicates, the task is to find the ranges of consecutive numbers from that array.… Read More
Given an array arr[ ] with even length N, the task is to find the number of cyclic shifts (rotations) possible for this array, such… Read More

Start Your Coding Journey Now!