Skip to content

Category Archives: Algorithms

Given a numeric string S of size N, the task is to find the number formed by adding numbers 1, 2, 3, … up to… Read More
Given an array arr[] of N integers, the task is to find the number of jumps required to escape the array arr[] for all values… Read More
Given an array arr[] of N positive integers and a range [L, R], the task is to find the maximum subset-sum such that the difference… Read More
Given an array arr[] of size N consisting of the first N natural numbers, the task is to find all the repeating and missing numbers… Read More
Given a positive integer N, the task is to find the minimum number of addition operations required to convert the number 0 to N such… Read More
Given a positive integer N, the task is to find the number of unordered pairs of semi-prime numbers in the range [1, N] such that… Read More
Given a root of the Binary Tree and head of the Linked List, the task is to check if all the elements of the linked… Read More
Given four numbers N, L, R, and S, the task is to find a permutation of first N natural numbers(1-based indexing) having the sum as… Read More
Given string S of size N, the task is to find the single-digit sum by the repetitive sum of digits of the value obtained by… Read More
Given root of the Binary Tree T and a linked list L, the task is to find the direction of path followed from root such… Read More
Given an array arr[] of N positive integers, the task is to find the minimum number of operations required to make the GCD of array… Read More
Given a string of lowercase letters S a character c. The task is to find minimum K such that every substring of length K contains… Read More
Given a positive integer N and an array arr[] of size M of the type {L, R, C} such that C is the cost of… Read More
Given a binary matrix mat[][] of dimensions M*N, the task is to check whether there exist T continuous blocks of 0s or not and at… Read More
Given an array arr[] of N distinct integer, the task is to find the minimum number of jumps required from the largest element to reach… Read More