Build number-processing skills through digit operations and factorial before divisors, primes, GCD, LCM and interview applications.
Log in/Sign up to track your progress
Striver’s Maths and Number Theory Sheet contains 18 coding questions. Four basic source exercises have been restored alongside the retained 14-question selection: counting all digits, counting odd digits, finding the largest digit, and iterative factorial. These provide basic number-processing practice before divisors, primes and related number-theory questions.
This sheet brings together 14 selected problems from existing takeUforward resources, with Beginner Problems and A2Z as the main sources. The groups cover GCD and divisibility, primes and factorization, digit-based reasoning, and fast exponentiation. The emphasis is on coding and analysis rather than memorizing formulas without their conditions.
For each attempt, write the permitted range of values and define the result precisely. Counting primes through n is different from counting primes strictly below n. Reversing a number also raises different boundary questions from comparing its decimal digits. Small wording differences can change both the loop and the answer.
Digit exercises use arithmetic to inspect or change a number, while factorial introduces an accumulated result. Later questions examine number properties, divisors, primality and shared factors. The iterative factorial exercise remains distinct from the recursive factorial practice in the Recursion sheet.
The Basic Maths lesson provides the topic introduction. Know integer arithmetic, division, remainder, comparisons, conditions and loops. Review simple arithmetic, loops and function calls if these skills are still unfamiliar.
Know integer division, remainder, loops and the numeric types in your language. Be clear about whether zero, negative values or leading zeroes are permitted by a task. A number and its decimal text are related representations, but operations on one do not automatically have the same behavior on the other.
Understand multiplication limits before using a formula. A mathematically correct product can overflow a fixed-width type before a later division or modulo reduces it. Choosing a wider type, changing a safe operation order or using a suitable modular method must follow the actual input bounds.