# Tag Archives: arithmetic progression

## K-th term from given N merged Arithmetic Progressions

Given an integer K and an array arr[] of N integers, each of which is the first term and common difference of an Arithemetic Progression,… Read More »

## Find the missing number in unordered Arithmetic Progression

Given an unsorted array arr[] of N integers that are in Arithmetic Progression, the task is to print the missing element from the given series.… Read More »

## Find K consecutive integers such that their sum is N

Given two integers N and K, the task is to find K consecutive integers such that their sum if N. Note: If there is no… Read More »

## Count common elements in two arrays which are in Arithmetic Progression

Given two arrays arr1[] and arr2[] of size M and N respectively. Both arrays are in Arithmetic Progression and the first element of both arrays… Read More »

## Count the Arithmetic sequences in the Array of size at least 3

Given an array arr[] of size N, the task is to find the count of all arithmetic sequences in the array. Examples: Input: arr =… Read More »

## Sum of elements of an AP in the given range

Given an arithmetic series in arr and Q queries in the form of [L, R], where L is the left boundary of the range and… Read More »

## Count maximum occurrence of subsequence in string such that indices in subsequence is in A.P.

Given a string S, the task is to count the maximum occurrence of subsequence in the given string such that indices of the characters of… Read More »

## Minimum elements inserted in a sorted array to form an Arithmetic progression

Given a sorted array arr[], the task is to find minimum elements needed to be inserted in the array such that array forms an Arithmetic… Read More »

## Sum of all numbers in the given range which are divisible by M

Given three numbers A, B and M such that A < B, the task is to find the sum of numbers divisible by M in… Read More »

## Check whether nodes of Binary Tree form Arithmetic, Geometric or Harmonic Progression

Given a binary tree, the task is to check whether the nodes in this tree form an arithmetic progression, geometric progression or harmonic progression. Examples:… Read More »

## Find an integer that is common in the maximum number of given arithmetic progressions

Given two integer arrays A[] and D[], where Ai and Di represent the first element and common difference of an arithmetic progression respectively, the task… Read More »

## Minimum operations to make two numbers equal

Given two numbers n and m, the task is to find the minimum number of operations required to make them equal if the following operations… Read More »

## Minimum increments to convert to an array of consecutive integers

Given an array arr[] with N elements, the task is to find the minimum number of operations required so that an Arithmetic Progression with the… Read More »

## Change one element in the given array to make it an Arithmetic Progression

Given an array which is an original arithmetic progression with one element changed. The task is to make it an arithmetic progression again. If there… Read More »

## Sum of i * countDigits(i)^2 for all i in range [L, R]

Given a range [L, R], the task is to find the sum i * countDigits(i)2 for all i ∈ [L, R] where countDigits(i) is the… Read More »