Math
Explore the math behind LeetCode problems, from number theory and combinatorics to bit manipulation and matrix exponentiation. Learn practical techniques through examples and solutions.
Number TheoryWelcome to our Number Theory tutorial page for LeetCode problems! Number theory is a branch of mathematics that deals with the properties and relationships of integers, which is very important in computer science. This tutorial will cover a range of topics in number theory that are commonly used to solve problems on LeetCode. We will be focusing on important algorithms and techniques such as modular arithmetic, prime numbers, gcd and more.Bit ManipulationBit Manipulation utilises different bitwise operations to manipulate bitsCombinatoricsCombinatorics is the branch of mathematics dealing with counting and enumerating the possibilities for a certain event to occur. It is heavily used as it enables us to find very short and concise answers to many problems.Matrix ExponentiationBinary Exponentiation but it involves matrices.Prime FactorsFactor of a given number which is a prime number.