Given a binary tree, the task is to find the length of the longest path which forms an Arithmetic progression. The path can start and… Read More

# Tag Archives: arithmetic progression

Given three positive integers A, B, and C, the task is to find out that, if we divide any one of them with any integer… Read More

Given 3 positive integers A, B, and C. Choose a positive integer M and multiply any one of A, B, or C with M. The… Read More

Given a positive integer N. The task is to find Nth term of the series: Examples: Input: N = 2Output: 2.25 Input: N = 3Output:… Read More

Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples : Input : arr[] = { 2, 6,… Read More

Given a number N, find the N-th term in the series 2, 2, 4, 4, 6, 8, 8……… Examples: Input: N = 1Output: 2 Input:… Read More

Given three positive integers N, X, and Y(X<Y). The task is to find an array of length N containing both X and Y, and when… 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 integer N, the task is to count all arithmetic progression with common difference equal to 1 and the sum of all its elements… 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

Given string str, the task is to check if it is possible to rearrange the string such that the characters of each word of the… Read More