Math Tricks in Competitive Programming

Competitive programming is not just about knowing programming syntax—it’s a blend of logic, speed, and mathematics. Mastering a few essential math tricks can drastically boost your problem-solving skills and efficiency. Let’s explore the most powerful and commonly used math techniques in competitive programming. Number of times a prime p exist in n! Example find no. … Read more

Complete Guide to Matrices

Matrices are fundamental data structures in computer science and mathematics. In competitive programming, matrices are widely used in problems involving 2D grids, dynamic programming, graph algorithms, geometry, and simulations. Basics of Matrices in Python Python doesn’t have a native matrix type. A matrix is typically represented as a list of lists: Concepts Matric Representation Initialisation … Read more

The Ultimate Beginner’s Guide for Competitive programming Part 1

Competitive programming or sport programming is a mind sport involving participants trying to program according to provided specifications. Recursion Recursion is one of the most powerful and elegant tools in programming or even in competitive — but it can seem confusing at first. In this guide, you’ll learn what recursion is, how to identify recursive … Read more

Coding Level 1

Modulo % Example to show Modulus operator: Refer Extract Last Digit(s) of a Number Digit separation Reverse a number Decimal to binary Using Bitwise Refer Binary to Decimal Using bitwise Array Reverse an Array Array Rotation Method 1 : Using Mod (%) Consider it as circular array and use the property of mod Note: Point … Read more