## Understanding the Pigeonhole Principle with Python

The Pigeonhole principle is a useful tool that can be applied in various scenarios. Applying this principle, one can perform data integrity checks and make statistical predictions.

## Understanding Linearity of Expectation

Linearity of expectation is a powerful concept in probability theory that simplifies the calculation of expected values in probabilistic experiments.

## Stable Marriage Problem Solution

Stable Marriage Problem is a problem in computer science of finding a stable matching between two equally sized sets based on preferences.

## Solving the Fractional Knapsack Problem

While the 0/1 Knapsack problem restricts you to take an item entirely, Fractional Knapsack problem allows you to take fractions of an item.

## Nim’s Game | Code Implementation

Nim’s game is played with a set of heaps, each containing a certain number of objects or stones. Two players take turns removing objects from the heaps

## Custom Randomize | Generate Integers with Equal Probability

Given a function foo(), that returns an integer between 1 and 5 with equal probability. Write a function using foo() that returns an integer between 1 and 7.

## Reservoir Sampling

Reservoir sampling is a category of randomised algorithms for choosing a simple random sample, without replacement, of k items

## Generate Pythagorean Triples

Given an integer limit, generate all Pythagorean Triples with values smaller than limit.

## Minimum Moves to Equal Array Elements – LeetCode Solution [Medium]

When we increment n – 1 elements, the relative difference between the highest number and all other numbers effectively decreases by 1.

## Line Problem Solution | CodeChef [Easy]

Consider the 2D grid formed by integer points on the XY Plane. The position of the Sniper and the Target are lattice points in this grid. The bullet shot by the Sniper will follow a straight line trajectory from (x1, y1) to (x2, y2). The bullet goes no further than (x2, y2).