# Category Archives: Algorithms

Given a very large number N, [1 ≤ length of digit of N (n) ≤ 106], the task is to find some positive integer of… Read More
Given two integers N and K and a range [L, R], the task is to build an array whose elements are unique and in the… Read More
The term “Memoization” comes from the Latin word “memorandum” (to remember), which is commonly shortened to “memo” in American English, and which means “to transform… Read More
Software developers are regarded as the unknown heroes who design, execute, deploy and manage software programs. It is indeed a lucrative career option that promises… Read More
Given a string S representing a Morse Code, the task is to check is the code is valid or not. A Morse code is valid… Read More
Given two integers N and M denoting the size of an array and the sum of the elements of the array, the task is to… Read More
Given a number N, the task is to check whether N has 7 divisors or not. Examples: Input: 64Output: 1 Explanation: 1, 2, 4, 8, 16,… Read More
Given a string S and a list of strings subs[] that stores the substrings of S and all the substrings are present only once, the… Read More
Every great programmer, like you, works to develop code that is as efficient as possible and produces the best results. So the main goal of… Read More
Given integers X, Y, and K, the task is to make X and Y equal in not more than K operations by applying the following… Read More
Given a set of cities and the distance between every pair of cities, the problem is to find the shortest possible route that visits every… Read More
What is a Proper Tail Call? Proper tail calls (PTC) is a programming language feature that enables memory-efficient recursive algorithms. Tail call optimization is where… Read More
Sorting algorithms are the means to sort a given set of data in an order according to the requirement of the user. They are primarily… Read More
Given a string S consisting of lowercase English alphabets, of length N, the task is to find the total number of distinct strings that can… Read More
Given a 2D matrix of size N x M and Q queries where each query represents a coordinate (x, y) of the matrix, the task… Read More