Mathematical algorithms are commonly used in programming interviews to test mathematical reasoning, number theory, arithmetic operations, and the ability to develop efficient solutions. These questions cover concepts such as GCD and LCM, prime numbers, sequences, modular arithmetic, factorials, and combinatorics.
- The questions range from basic number operations to advanced mathematical algorithms and optimization techniques.
- Practicing these problems helps build the mathematical and problem-solving skills required to solve coding interview questions efficiently.
Basic Problems
- Sum of Naturals
- Sum of Squares of Naturals
- Nth Term of AP
- Nth Term of GP
- Nth Triangular Number
- Sum of n natural numbers
- Count Digits
- Sum of Digits
- Reverse Digits
- K-th Digit in a^b
- Palindrome Number
- GCD of Two Numbers
- LCM of Two Numbers
- Add two fractions
- Check for Co-Prime
- Factorial of a Number
- GCD of more than 2
- LCM of more than 2
Easy Problems
- Pair Cube Count
- Sum of 2, 22, 222, ………
- Sum of 1^2 + 3^2 + 5^2 + . . . + (2*n – 1)^2
- n-th term of 2, 12, 36, 80, 150….
- Digit Root
- Fibonacci Numbers
- Lucas Number
- Check for Power
- Three Divisors
- Square Root
- Binomial Coefficient
- Pascal Triangle
- nth Row of the Pascal Triangle
- Armstrong Numbers
- Determinant of a Matrix
- Modular Exponentiation
- Check for Perfect Squares
- Divisibility by 3
Medium Problems
- Linear Diophantine Equations
- Euler's Totient Function
- Sieve of Eratosthenes
- All Divisors
- Prime Factorization
- Largest Prime Factor
- Factorial of a Large Number
- Largest Power Divisible in Factorial
- Last Non-zero Digit of Factorial
- Power Set
- Add Two Polynomials
- Check for Carmichael Numbers
- Collatz sequence
- Grid Unique Paths
- Nth Even Fibonacci Number