LeetCodechevron_rightCategorieschevron_rightmath
calculate

math

528 problems
Easy: 142Medium: 243Hard: 143

math is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

Problem bank

math problem bank

Start with a compact scan-friendly list and progressively load more so the topic page stays readable even when the corpus is large.

Progressive topic library

Built for large topic sets: scan the structure first, then go deeper.

hourglass_bottomScroll to continue
search
tuneDifficulty

Showing 24 / 528 problems

+24 per load
#TitleDifficulty
2

Add Two Numbers

Add Two Numbers requires careful linked-list pointer manipulation to sum digits while handling carries efficiently in in…

Medium
7

Reverse Integer

Reverse Integer challenges you to invert the digits of a signed 32-bit integer, handling overflow and negative values ca…

Medium
9

Palindrome Number

Determine if a given integer reads the same forward and backward using a math-driven solution strategy without convertin…

Easy
12

Integer to Roman

Convert a given integer to its Roman numeral representation using hash table mapping and decimal place math operations e…

Medium
13

Roman to Integer

Convert a Roman numeral string into an integer using a hash table and mathematical principles to determine value order.

Easy
29

Divide Two Integers

Solve Divide Two Integers by turning repeated subtraction into bit-shifted chunk subtraction with careful sign and overf…

Medium
43

Multiply Strings

Multiply Strings requires simulating integer multiplication using only string operations without direct numeric conversi…

Medium
48

Rotate Image

Rotate an n x n matrix 90 degrees clockwise in-place using array manipulation and mathematical indexing techniques effic…

Medium
50

Pow(x, n)

Calculate x to the power n efficiently using recursion and exponentiation, handling negative powers and large inputs saf…

Medium
60

Permutation Sequence

Find the kth permutation sequence of a set of numbers using math and recursion to efficiently compute the result.

Hard
62

Unique Paths

Calculate the number of unique paths for a robot to move on an m x n grid with only right and down movements.

Medium
66

Plus One

Given a number as an array of digits, increment it by one and return the updated array of digits.

Easy
67

Add Binary

Add Binary involves summing two binary strings and returning the result as a binary string using math and string manipul…

Easy
69

Sqrt(x)

Solve the Sqrt(x) problem using binary search to find the integer square root of a number without built-in operators.

Easy
70

Climbing Stairs

Climbing Stairs is a classic dynamic programming problem where you calculate distinct ways to reach the top using step t…

Easy
89

Gray Code

Generate an n-bit Gray Code sequence using backtracking with pruning and bit manipulation techniques.

Medium
96

Unique Binary Search Trees

Given n nodes, calculate the number of unique binary search trees (BSTs) that can be formed with values from 1 to n.

Medium
149

Max Points on a Line

Find the maximum number of points on a straight line in a 2D plane using array scanning and hash lookup.

Hard
150

Evaluate Reverse Polish Notation

Compute the result of an arithmetic expression in Reverse Polish Notation using a stack to manage operands efficiently.

Medium
166

Fraction to Recurring Decimal

Convert a fraction into a decimal, handling repeating decimals with parentheses around the repeating part.

Medium
168

Excel Sheet Column Title

Convert a positive integer to its corresponding Excel column title using base-26 math and string manipulation efficientl…

Easy
171

Excel Sheet Column Number

This problem requires converting an Excel column title into its corresponding column number by applying a math and strin…

Easy
172

Factorial Trailing Zeroes

Given a number n, find how many trailing zeroes are in n! using a math-driven approach.

Medium
189

Rotate Array

Rotate Array challenges you to shift elements right by k steps using precise two-pointer scanning and invariant tracking…

Medium

swap_vertScroll inside the bank to auto-load more

Related Patterns

Math LeetCode Problems: 528 Solutions