Problem library
Math & Germetry
All problems that are about math and geometry.
85
/ 85 problems
| Problem | Category | Time | Solved |
|---|---|---|---|
|
Can make arithmetic progression from sequence
math-and-geometry
array-and-hashmap
|
O(nlog(n)) | Jun 5, 2023 | |
|
Check if it is a straight line
math-and-geometry
|
O(n) | Jun 4, 2023 | |
|
Sum in a matrix
math-and-geometry
|
O(nmlog(m)) | May 23, 2023 | |
|
Find three consecutive integers that sum to a given number
math-and-geometry
|
O(1) | May 22, 2023 | |
|
The kth factor of n
math-and-geometry
|
O(n) | May 19, 2023 | |
|
Make array zero by subtracting equal amounts
heap
math-and-geometry
|
O(nlogn) | May 13, 2023 | |
|
Valid boomerang
math-and-geometry
|
O(1) | May 8, 2023 | |
|
Substrings that begin and end with the same letter
array-and-hashmap
math-and-geometry
|
O(n) | May 5, 2023 | |
|
Greatest common divisor of strings
math-and-geometry
|
O(n) | Feb 1, 2023 | |
|
Max points on a line
math-and-geometry
|
O(n^2) | Jan 8, 2023 | |
|
Check if number is a sum of powers of three
math-and-geometry
|
O(log(n)) | Jan 4, 2023 | |
|
Convert to base -2
math-and-geometry
|
O(log(n)) | Jan 4, 2023 | |
|
Count the digits that divide a number
math-and-geometry
|
O(n) | Jan 1, 2023 | |
|
Distinct prime factors of product of array
math-and-geometry
|
O(nlog(n)) | Jan 1, 2023 | |
|
Count number of ways to place houses
math-and-geometry
|
O(n) | Dec 28, 2022 | |
|
Next palindrome using same digits
math-and-geometry
|
O(n) | Dec 27, 2022 | |
|
Perfect number
math-and-geometry
|
O(sqrt(n)) | Dec 27, 2022 | |
|
Count anagrams
math-and-geometry
|
O(n) | Dec 25, 2022 | |
|
Day of the year
math-and-geometry
|
O(1) | Dec 18, 2022 | |
|
Powerful integers
math-and-geometry
|
O(n^2) | Dec 18, 2022 | |
|
Add two integers
math-and-geometry
|
O(1) | Dec 17, 2022 | |
|
Ugly number III
math-and-geometry
|
O(log(n)) | Dec 14, 2022 | |
|
Number of ways to buy pens and pencils
math-and-geometry
|
O(n) | Dec 6, 2022 | |
|
Fraction to recurring decimal
math-and-geometry
|
O(n) | Dec 5, 2022 | |
|
Number of subarrays with gcd equal to k
math-and-geometry
|
O(n^2) | Dec 3, 2022 | |
|
Number of subarrays with lcm equal to k
math-and-geometry
|
O(n^2) | Dec 3, 2022 | |
|
Nth digit
math-and-geometry
|
O(log(n)) | Dec 2, 2022 | |
|
Factorial trailing zeroes
math-and-geometry
|
O(log(n)) | Dec 1, 2022 | |
|
Nim game
math-and-geometry
|
O(1) | Nov 30, 2022 | |
|
Sparse matrix multiplication
math-and-geometry
|
O(n^3) | Nov 30, 2022 | |
|
Find greatest common divisor of array
math-and-geometry
|
O(nlog(n)) | Nov 25, 2022 | |
|
Power of two
math-and-geometry
bit-maniuplation
|
O(log(n)) | Nov 23, 2022 | |
|
Rabbits in forest
math-and-geometry
|
O(n) | Nov 23, 2022 | |
|
Shuffle an array
math-and-geometry
design
|
O(n) | Nov 22, 2022 | |
|
Base 7
math-and-geometry
|
O(log(n)) | Nov 21, 2022 | |
|
Minimum addition to make integer beautiful
math-and-geometry
|
O(log(n)) | Nov 21, 2022 | |
|
Erect the fence
math-and-geometry
|
O(nlogn) | Nov 19, 2022 | |
|
Number of digit one
math-and-geometry
|
O(log(n)) | Nov 17, 2022 | |
|
Rectangle area
math-and-geometry
|
O(1) | Nov 17, 2022 | |
|
Count of matches in tournament
math-and-geometry
|
O(log(n)) | Nov 15, 2022 | |
|
Number of zero filled subarrays
math-and-geometry
|
O(n) | Nov 12, 2022 | |
|
Count numbers with unique digits
math-and-geometry
|
O(n) | Nov 11, 2022 | |
|
Average value of even numbers that are divisible by three
math-and-geometry
|
O(n) | Nov 8, 2022 | |
|
Smallest good base
math-and-geometry
|
O(log(n)^2) | Nov 3, 2022 | |
|
Optimal division
math-and-geometry
|
O(n) | Oct 31, 2022 | |
|
Pairs of songs with total durations divisible by 60
math-and-geometry
|
O(n) | Oct 31, 2022 | |
|
Sum of number and its reverse
math-and-geometry
|
O(n) | Oct 28, 2022 | |
|
Count good numbers
math-and-geometry
|
O(1) | Oct 27, 2022 | |
|
Escape the ghosts
math-and-geometry
|
O(n) | Oct 25, 2022 | |
|
Set mismatch
math-and-geometry
|
O(n) | Oct 23, 2022 | |
|
Find missing observations
math-and-geometry
|
O(m+n) | Oct 13, 2022 | |
|
Find positive integer solution for a given equation
math-and-geometry
|
O(x+y) | Oct 13, 2022 | |
|
Shift 2d grid
math-and-geometry
|
O(m*n) | Oct 13, 2022 | |
|
Largest perimeter triangle
math-and-geometry
|
O(nlogn) | Oct 12, 2022 | |
|
Palindrome number
math-and-geometry
|
O(n) | Oct 4, 2022 | |
|
Ugly number
math-and-geometry
|
O(n) | Oct 4, 2022 | |
|
Bulb switcher
math-and-geometry
|
O(1) | Sep 27, 2022 | |
|
Strictly palindromic number
math-and-geometry
|
O(n^2) | Sep 27, 2022 | |
|
Number of sub arrays with odd sum
math-and-geometry
|
O(n) | Sep 18, 2022 | |
|
Spiral matrix II
math-and-geometry
|
O(n) | Sep 14, 2022 | |
|
Elimination game
math-and-geometry
|
O(n) | Sep 12, 2022 | |
|
Robot bounded in circle
math-and-geometry
|
O(n) | Sep 8, 2022 | |
|
Count primes
math-and-geometry
|
— | Sep 5, 2022 | |
|
Minimum moves to equal array elements II
math-and-geometry
|
O(nlog(n)) | Sep 3, 2022 | |
|
Clumsy factorial
math-and-geometry
|
O(1) | Sep 1, 2022 | |
|
Minimum moves to equal array elements
math-and-geometry
|
O(n) | Sep 1, 2022 | |
|
Divide two integers
math-and-geometry
|
O(1) | Aug 29, 2022 | |
|
Sort the matrix diagonally
math-and-geometry
|
O(n*m*log(n*m)) | Aug 28, 2022 | |
|
Power of three
math-and-geometry
|
O(log(n)) | Aug 24, 2022 | |
|
Power of four
math-and-geometry
|
O(log(n)) | Aug 22, 2022 | |
|
Find triangular sum of an array
math-and-geometry
|
O(n^2) | Aug 16, 2022 | |
|
String to integer atoi
math-and-geometry
|
O(n) | Aug 16, 2022 | |
|
Roman to integer
math-and-geometry
|
O(n) | Aug 15, 2022 | |
|
Detect squares
math-and-geometry
|
O(1) | Aug 7, 2022 | |
|
Multiply strings
math-and-geometry
|
O(n*m) | Aug 7, 2022 | |
|
Pow(x, n)
math-and-geometry
|
O(log(n)) | Aug 7, 2022 | |
|
Rotate image
math-and-geometry
|
O(n) | Aug 7, 2022 | |
|
Set matrix zeroes
math-and-geometry
|
O(n) | Aug 7, 2022 | |
|
Spiral matrix
math-and-geometry
|
O(n) | Aug 7, 2022 | |
|
Poor pigs
math-and-geometry
|
O(log(n)) | Aug 6, 2022 | |
|
Mirror reflection
math-and-geometry
|
O(n) | Aug 4, 2022 | |
|
Sum of two integers
math-and-geometry
|
O(1) | Jul 31, 2022 | |
|
Happy number
math-and-geometry
|
O(n) | Jul 28, 2022 | |
|
Plus one
math-and-geometry
|
O(n) | Jul 23, 2022 | |
|
Prime number of set bits in binary representation
math-and-geometry
|
O(n) | Jul 21, 2022 |
No matching problems
Try clearing one of the filters.