Overview The objective is to design an ATM machine. Please note that designing an ATM Machine is an Object-Oriented Problem. It is not a distributed system problem. So we need to approach…
Author: admin
Design a Vending Machine
Overview The objective is to design a vending machine. Please note that designing a Vending Machine is an Object-Oriented Problem. It is not a distributed system problem. So we need to approach…
Program for height of a binary tree
Overview The objective is to get the height of a binary tree. For example, if let’s say we have below binary tree Then the height of the binary tree is 3 here….
LRU Cache Design
Overview In this tutorial, we are also going to consider the FIFO approach in our design as well other than LRU so that the design is flexible enough to switch to any…
Design an In-Memory Cache
Overview The objective is to Design an in-memory cache. Below are the requirements It should support Set and Get Operation O(1) Time Complexity for both Set and Get Assume the maximum capacity…
Check if a given tree is a Binary Search Tree
Overview We can use the below strategy to know if a given tree is a BST. For a given current node, if the left and right subtree are BST The maximum value…
Whatsapp System Design
Overview While answering any system design question it is important to keep in mind that system design questions can be really broad. Hence never directly jump to the solution. It is good…
Interleaving String Program
Overview Three strings are given s1, s2, s3. Find if string s3 is interleaving of string. s3 will be an interleaving of string s1 and s2 if the below condition is satisfied…
Generate UUID without a dash in the terminal in MAC OS
Overview dbus-uuidgen can be used to generate a UUID without a dash in terminal on MAC Below is an example for the same Example
Group anagrams together program
Overview Given an array of strings, write a program to group all anagrams together. From Wikipedia An anagram is a word or phrase formed by rearranging the letters of a different word or phrase,…