PHP program to print an arithmetic progression series using inbuilt functions
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....
read more
Javascript Program For Rearranging An Array In Maximum Minimum Form – Set 2 (O(1) extra space)
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:...
read more
Javascript Program for Products of ranges in an array
Given an array A[] of size N. Solve Q queries. Find the product in the range [L, R] under modulo P ( P is Prime)....
read more
Php Program For Rearranging An Array In Maximum Minimum Form – Set 2 (O(1) extra space)
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:...
read more
Javascript Program To Multiply Two Numbers Represented By Linked Lists
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists....
read more
Javascript Program for Print all triplets in sorted array that form AP
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :...
read more
Generate Array whose sum of all K-size subarrays divided by N leaves remainder X
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:...
read more
Print last k digits of a^b (a raised to power b)
Given positive integers k, a and b we need to print last k digits of a^b ie.. pow(a, b)....
read more
Python3 Program to Print all triplets in sorted array that form AP
Given a sorted array of distinct positive integers, print all triplets that form AP (or Arithmetic Progression)Examples :...
read more
Count of AP (Arithmetic Progression) Subsequences in an array
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:...
read more
Padovan Sequence
Padovan Sequence similar to Fibonacci sequence with similar recursive structure. The recursive formula is,...
read more
Minimize the maximum of Matrix whose rows and columns are in A.P
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:...
read more