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. …
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:
Think about it. We can use the following data structures…