# Tag Archives: Arithmetic Progressions

Given two integers N and M denoting a matrix of size N*M, the task is to form a matrix following the below criteria and make… Read More
Given an array A[] of N integers. Consider an integer num such that num occurs in the array A[] and all the positions of num,… Read More
Given an array arr[] of N integers. The task is to convert the array into an Arithmetic Progression with the minimum number of replacements possible.… Read More
Given a N x N matrix, such that the element at the index [N/2, N/2] is missing, the task is to find the maximum integer… Read More
Given an array arr[] of N integers and an integer K, the task is to find the length of the longest subarray that forms an… Read More
Given two natural numbers A and B (B >= A) and an integer N, your task is to generate an array of natural numbers in… Read More
Given an array arr[] consisting of N integers, the task is to find the minimum number of increment/decrement by 1 required to be performed on… Read More
Given an array A[] consisting of N integers and Q queries, say Query[][] of the form {L, R, a, d} such that each query represents… Read More
Given a Binary Tree consisting of N nodes, the task is to find the length of the longest path from any node to the bottom… Read More
Given three integers A, D, and R representing the first term, common difference, and common ratio of an infinite Arithmetic-Geometric Progression, the task is to… Read More
Given an array arr[] consisting of N integers and an array Q[][2] consisting of M queries of the form {L, R}, the task for each… Read More
Given two integers L and R, the task is to find the number of unique triplets whose values lie in the range [L, R], such… Read More
Given two integers S and D, the task is to count the number of Arithmetic Progressions possible with sum S and common difference D. Examples:… Read More
Given a sorted array arr[] consisting of N distinct elements, the task is to find the maximum possible common difference of an arithmetic progression such… Read More
A progression is a sequence or series of numbers in which they are arranged in a particular order such that the relation between the consecutive… Read More