# Category Archives: Algorithms

Greedy algorithm and divide and conquer algorithm are two common algorithmic paradigms used to solve problems. The main difference between them lies in their approach… Read More
Given a binary array A[] and an integer X, the task is to check whether it is possible to divide A[] into exactly X non-empty… Read More
Given a binary string str, the task is to find the maximum possible OR value of any two substrings of the binary string str. Examples:… Read More
Given an integer N, the task is to find a minimum possible Y that satisfies the following condition: Y > N. Y is not divisible… Read More
Given two arrays X[] and Y[] of length N each. You can make a pair by selecting exactly one element from X[] and Y[]. The… Read More
We have two standard sorting algorithms, named bucket sort and radix sort. They both share differences and similarities. Let’s explore some similarities, differences, advantages, and… Read More
Given a matrix mat[][] of size N * M, and Q queries each of type {L, R} that denotes a range of row [L, R].… Read More
Given an array arr[] and a number K, the task is to find a value X such that maximum number of array elements can be… Read More
Given two strings S and T of length N, the task is to find the maximum points gained in converting the string S into string… Read More
Tableau is a powerful data visualization tool with one of the fastest, most robust, and rapidly expanding data visualization solutions. It assists in converting raw… Read More
Given the side (a, b, c) of a triangle and we have to find the perimeter of a triangle. Perimeter: Perimeter of a triangle is… Read More
Given the radius of a circle, find the area of that circle. The area of a circle can simply be evaluated using the following formula:… Read More
Given a positive integer n, write a function to find if it is a power of 2 or not Examples: Input: n = 4 Output:… Read More
What is ‘Compound interest’ ? Compound interest is the addition of interest to the principal sum of a loan or deposit, or in other words, interest… Read More
What is ‘Simple Interest’?Simple interest is a quick method of calculating the interest charge on a loan. Simple interest is determined by multiplying the daily… Read More