We have to print an arithmetic progressive series in PHP, between two given numbers a and b both including, a given common arithmetic difference of d....
Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, third-second max, fourth-second min and so on. Examples:...
Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime)....
Given a sorted array of positive integers, rearrange the array alternately i.e first element should be the maximum value, second minimum value, third-second max, fourth-second min and so on. Examples:...
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists....
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :...
Given three integer N, K and X, the task is to create an array of length N such that sum of all its K-length subarrays modulo N is X.Examples:...
Given positive integers k, a and b we need to print last k digits of a^b ie.. pow(a, b)....
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :...
Given an array of n positive integers. The task is to count the number of Arithmetic Progression subsequence in the array. Note: Empty sequence or single element sequence is Arithmetic Progression. 1 <= arr[i] <= 1000000.Examples:...
Padovan Sequence similar to Fibonacci sequence with similar recursive structure. The recursive formula is,...
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 the maximum element as minimum as possible:...