Part 1


This article discusses topics that are frequently used to solve programming problems based on math. we have so many problems in real life that are solved by number theory.


this writeup discusses the few most important concepts in number theory that have so many problems, every problem solver should ideally know. It is neither an introductory tutorial. Rather, this writeup is intended to act as a reference.

a = bq + r, 0 ≤ r < b

q is typically called quotient, whereas r is called the remainder. …

Examples of Hashing

Hashing is the most important Data Struct that we use every day which is designed to use a special formula to encode the given value with a particular key for faster access of elements. the efficiency of hashing depends on the formula we used. Let's go into detail.


Suppose we want to design a system for storing users and their passwords. And we want to access to be performed efficiently:

  1. Insert a user name and corresponding password.
  2. Search a user and change their password.
  3. Delete a user and corresponding password.

Think about it. We can use the following data structures…

Prime Pake

Keep calm and use STACK overflow instead — hit the ground running —

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store