🌱
Master the Fundamentals
These basics are the foundation of all DSA. Don't skip them! Use hints to develop your problem-solving intuition.
Problems (6)
Reverse a Number
EasyGiven an integer, reverse its digits. Handle negative numbers and overflow.
StriverLeetCode
Pattern: Math / Modulo
Palindrome Number
EasyDetermine if an integer is a palindrome (reads same forwards and backwards).
StriverLeetCode
Pattern: Math / Two Pointers
Armstrong Number
EasyCheck if a number equals sum of its digits raised to the power of number of digits.
Striver
Pattern: Math
Count Digits
EasyCount number of digits in a given integer.
Striver
Pattern: Math / Logarithm
GCD and LCM
EasyFind Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two numbers.
StriverLeetCode
Pattern: Euclidean Algorithm
Check Prime Number
EasyDetermine if a number is prime. Optimize to check only up to sqrt(n).
StriverLeetCode
Pattern: Math / Optimization
👈
Select a Problem
Choose a problem from the list to start practicing