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 the 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 a circular array and use the property of mod, which … Read more

Python tips and tricks for competitive programming

Here are some Python hacks for competitive programming that can help you write efficient and concise code. String Operation Join Synatx Example Perform join in integer Solution Dictionary When using a dictionary as an iterable, the returned values are the keys, not the values. Just like are searching whether a key exists in hash/dict, but … Read more