Skip to content

Tag Archives: Modular Arithmetic

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
Given an array arr[] of positive integers and a positive number K, the task is to find the minimum swaps of elements required such that… 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

Start Your Coding Journey Now!