Maths Problems

Prime numbers, combinatorics, puzzles, geometry, and number theory problems.

Filter by difficulty:
Prime Numbers
Check if a number is prime Easy
Calculate all prime numbers till N Medium
Puzzle & DP Problems
Perform A/B without using *, /, or % operator Medium
Egg Drop Puzzle – 2 Eggs & 100 Floors Medium
Egg Drop Puzzle – 2 Eggs & N Floors Medium
Egg Drop Puzzle – K Eggs & N Floors (DP) Hard
Count trailing zeroes in n! Medium
Form the largest number from an integer array Medium
Max Points on a line Hard
Next Greater Number Medium
Square root of x Medium
Generate the nth ugly number (factors 2,3,5 only) Medium
Check if a string is a valid number Hard
Points & Geometry
Count Triangles from a given array Medium
Check if 4 points form a rectangle Medium
Check if 4 points form a square Medium
Check if two line segments intersect Medium
Check if a point is inside a triangle Medium
Check if a point is inside a polygon Hard
Closest pair in a 2D plane Hard
Power Checks
Check if a number is power of 3 Medium
Check if a number is power of 4 Medium