Overview Designing a snake and ladder game is a low-level design problem and it should be solved that way only. In this question, the interview is looking to test your Object Oriented…
Author: admin
Nearby Friends System Design
Overview The objective is to design the nearby friends feature. When we say nearby then it means that the location of the friends is constantly changing. As and when the location changes,…
Design a Leaderboard or Low-Level Design of a Leaderboard
Overview In this tutorial, we will design a leaderboard and see the full working code for it. Below are some of the requirements for the leaderboard which we are going to design…
Chess Game System Design
Overview In this tutorial, we are going to design a chess game. Chess is a board game that is played between two players. More information about chess is available here https://en.wikipedia.org/wiki/Chess Before…
Design a hit counter
Overview The objective is to design a hit counter that will record the number of visits to a website till the last 5 min. It is a tricky question. Your design should be…
Check if a file exists in Ruby Language
Overview File class in ruby provides a method that returns true if a given file exists and returns false if a given false doesn’t exist https://ruby-doc.org/core-3.0.0/File.html#method-c-exist-3F Here is the signature of this…
Parking Lot 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…
Grep two words together in terminal
Overview Here are sample examples to do it Let’s create a sample.txt file first sample.txt Here are some ways to search two words together using grep Approach 1 Example Approach 2 Example…
How to make any folder a favorite in MAC OS
Overview Simply drag that folder to the favorite. Here are the steps Go to that folder. Let’s say that folder name is the wedding in the ~/Desktop location. Click Finder in the…
zsh: no matches found: HEAD^
Overview ^ character is a special character in filename expansion in zsh. There are a couple of ways to fix it Workaround 1 Escape the ^ character Eg or use quotes Workaround…