Open In App

Number Theory for DSA & Competitive Programming

Last Updated : 11 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

What is Number Theory?

Number theory is a branch of pure mathematics that deals with the properties and relationships of numbers, particularly integers. It explores the fundamental nature of numbers and their mathematical structures. Number theory has been studied for centuries and has deep connections with various areas of mathematics, including algebra, analysis, and geometry.

Basics of Number Theory:

Modular Arithmetic:

Number Theory:

Game Theory:

Practice Problems on Number Theory:

Problems

Searching for Patterns | Set 3 (Rabin-Karp Algorithm)
Measure one litre using two vessels and infinite water supply
Program to find last digit of n’th Fibonnaci Number
GCD of two numbers when one of them can be very large
Find Last Digit Of a^b for Large Numbers
Remainder with 7 for large numbers
Find (a^b)%m where ‘a’ is very large
Find sum of modulo K of first N natural number
Count all sub-arrays having sum divisible by k
Partition a number into two divisble parts
Find power of power under mod of a prime
Rearrange an array in maximum minimum form | Set 2 (O(1) extra space)
Subset with no pair sum divisible by K
Number of substrings divisible by 6 in a string of integers

Miscellaneous Practice Problems on Number Theory:

Problems

How to compute mod of a big number?
BigInteger Class in Java
Modulo 10^9+7 (1000000007)
How to avoid overflow in modular multiplication?
RSA Algorithm in Cryptography

Quick Links



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads