## LCM of N numbers modulo M

Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M =… Read More »

- Practice for cracking any coding interview
- How to get rid of Java TLE problem
- How can one become good at Data structures and Algorithms easily?
- Burst Balloon to maximize coins
- Subset array sum by generating all the subsets
- Understanding The Coin Change Problem With Dynamic Programming
- Sum of similarities of string with all of its suffixes
- Reach the numbers by making jumps of two given lengths
- Find triplets in an array whose AND is maximum
- Maximize the total profit of all the persons
- Length of the longest Subarray with only Even Elements
- Print matrix in snake pattern from the last column
- Check if a number is perfect square without finding square root
- Sort the array of strings according to alphabetical order defined by another string
- Number of quadrilaterals possible from the given points
- Introduction to Programming Languages
- How to read Competitive Programming Questions?
- Minimum number of increasing subsequences
- How can competitive programming help you get a job?
- Some useful C++ tricks for beginners in Competitive Programming
- Python in Competitive Programming
- Sum of the first N Prime numbers
- Sum of the multiples of two numbers below N
- Check if any permutation of a large number is divisible by 8
- Number of array elements derivable from D after performing certain operations
- Minimum cost to buy N kilograms of sweet for M persons
- Number of elements greater than K in the range L to R using Fenwick Tree (Offline queries)
- Smallest Pair Sum in an array
- Minimum cost path from source node to destination node via an intermediate node
- Kth Smallest sum of continuous subarrays of positive numbers

Given an array arr[] of integers, the task is to find the LCM of all the elements of the array modulo M where M =… Read More »

Given a range represented by two positive integers L and R. The task is to count the numbers from the range having GCD of powers… Read More »

Given a matrix of 2-Dimensional array of n rows and n columns. Print this matrix in snake fashion starting from column n-1 as shown in… Read More »

Given a matrix of 2-Dimensional array of n rows and n columns. Print this matrix in ZIG-ZAG fashion starting from column n-1 as shown in… Read More »

Given three integer A, B and N. The task is to find the sum of all the elements below N which are multiples of either… Read More »

Designed by Freepik Let us first clarify the question. There is not any easy way to become good at anything but there is an efficient… Read More »

Given two arrays of size N and two integers X and Y indicating the maximum number of elements one can pick from array A and… Read More »

Given an array of N positive elements find the number of quadruple, (i, j, k, m) such that i < j < k < m… Read More »

Given an integer N and an array arr containing integers from 1 to N in sorted fashion. The task is to reduce the array to… Read More »

Given an array of integers. The task is to find the maximum sum of all the elements of the array after performing the given two… Read More »

Given two integers A and B, the task is to find the minimum positive integer N such that N is divisible by A and the… Read More »

Given an array A of N integers and number of queries Q. You have to answer two types of queries. Update [l, r] – for… Read More »

Given a N-ary tree, the task is to print the level with the maximum number of nodes. Examples: Input : For example, consider the following… Read More »

Given a string S of length N consisting of lowercase English letters and an integer K. Find the lexicographically smallest string T of length K,… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »