# Category Archives: Algorithms

Given two arrays of strings A[] and B[] containing only small case letters, the task is to count the number of strings in A[] such… Read More
Given Q queries in the form of a 2D array arr[][] in which every row consists of two numbers L and R which denotes a… Read More
Given an array A[] of N  integers, the task is to calculate the total number of pairs of indices (i, j) satisfying the following conditions… Read More
Given an array of non-negative integers arr[] and an integer K, the task is to minimize the product of array elements by performing at K… Read More
Given a string S of size M consisting of only zeroes (and hence representing the integer 0). Also, given an array A[] of size N… Read More
Given an array arr[] of N integers such that no element is 0 in that array, the task is to find the minimum number of… Read More
Given an array A[] of N integers, the task is to find the number of pairs of indices (1 ≤ i, j ≤ N) in… Read More
Given a string S that consists of only alphanumeric characters and dashes. The string is separated into N + 1 groups by N dashes. Also… Read More
Given two arrays A[] and B[] of the same length N. the task is to find a pair (X, Y) for two numbers Ai (number… Read More
Given a string s of lowercase English alphabets and integer K. the task is to check if each character after increasing their ASCII by K… Read More
Given a binary string S of length N, the task is to find the number of pairs of integers [L, R] 1 ≤ L <… Read More
Given a string S consisting of lower case letters and an integer K, the task is to remove minimum number of letters from the string,… Read More
Given an arr[] of size N and an integer, K, the task is to find the maximum possible value of MEX by adding or subtracting… Read More
Given an array A[] of length N, the task is to minimize the maximum frequency of any array element by performing the following operation only… Read More
A Binary Search Tree or BST is a binary tree where every node to the left of its root has a value less than the… Read More