# Tag Archives: Modular Arithmetic

Given an integer N, the task is to find the minimum and the maximum number of terms required to divide N as the sum of… Read More
Given three numbers n, r and p, the task is to compute the value of nCr % p. Note: p is a square-free number and… Read More
Given two integers N representing the dimension of a square matrix and an integer A with which the matrix is initialized. Given another integer mod.… Read More
Given two integers N and M (1 ≤ N, M ≤ 100) denoting the total number of 1s and 0s respectively. The task is to… Read More
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists. Examples:  Input: 9->4->6 8->4 Output: 79464… Read More
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists. Examples:  Input: 9->4->6 8->4 Output: 79464… Read More
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists. Examples:  Input: 9->4->6 8->4 Output: 79464… Read More
Given two numbers represented by linked lists, write a function that returns the multiplication of these two linked lists. Examples:  Input: 9->4->6 8->4 Output: 79464… Read More
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
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
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
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
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
Given an array arr containing N positive integers, sort them according to the increasing modulus of their values with their frequencies. Example: Input: arr[]={1, 1,… Read More
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… Read More