Logger Rate Limiter Solution (LeetCode)

This question is from the LeetCode Challenge (Aug-2020). See the original question here Design a logger system that receive a stream of messages along with […]

Fitting Shelves Problem

Given the length of a wall w and infinite shelves of two lengths small and large (large > small). Find the optimal solution to put […]

Assign Mice to Holes

There are N Mice and N holes placed in a straight line. Each hole can accommodate only 1 mouse. A mouse can stay at his […]

Max Distance between two occurrences of the same element

Given an array of integers where elements may be repeating in the array. Find the maximum distance between two occurrences of the same element in […]

Swapping two variables without using third variable

This is a very common interview question, esp. at the junior level. Let us first write a function that swap two integers using a third […]

Count max points on a line

Given n points on a 2D plane with (x, y) co-ordinates. Find the maximum number of points lie on the same straight line.

Print all Subsequences of an Array

Given an array of integers, Print all possible subsequences of that array.

Coin Change Problem. Greedy Solution

Find min number of currency notes that we need to give for a given change. The following Video discusses the Greedy solution. If you want […]

Introducing Bloom filters

The following Video introduces Bloom Filters. To master the System Design Interview, Join our online (live) classes. Click here for more details…

System Design of Centralized Logging System

In the following video, we discuss the design of a centralized logging system: Join our online (live) classes and master the System Design Interviews: Click […]