Overview A distributed system is a system in which that has multiple nodes connected to each other through the network. CAP theorem is a fundamental theorem in distributed systems and has three…
Author: admin
What does Strong Consistency mean in Database
Overview In simple terms, a system is strongly consistent if it is reading the most updated write. It never returns out of date or stale values. As per the Wikipedia, the definition…
Longest Common Prefix in a set of strings
Overview An array of strings is given. The objective is to find the longest common prefix from that array of strings. It should output an empty string if there is no common…
What does chmod o-w command mean in bash or terminal
Overview There are three components that are in the picture when it comes to managing the permissions of a file. Permission Groups User – Abbreviated by ‘u’ Group – Abbreviated by ‘g’…
Instagram System Design
Overview Instagram is one of the most popular social media sharing apps which allows users to share their photos and videos with other users. Users can like and comment on other users’…
Maximum Length of Contiguous Subarray with an equal number of 0’s and 1’s
Overview An array is given that only has 0’s and 1’s. The objective is to find a maximum length subarray with an equal number of 0’s and 1’s. Let’s understand it with…
Maximum Difference between increasing elements in an array
Overview An array is given. The objective is to find the maximum difference between values at two indexes i and j such that j > i arr[j] > arr[i] If no such…
Two furthest houses with different colors
Overview An array is given which represents the color of houses. So array[i] represents the color of the house at index i. The objective is to find two furthest houses with different…
Non-Overlapping intervals program
Overview An array of intervals is given where intervals[i] = [starti, endi]. We have to find out the minimum number of intervals to remove so that the interval in the intervals array…
Kth Distinct String in an Array Program
Overview An input string array is given which can have duplicate strings as well. An input number k is also provided. Idea is to find the first kth distinct string in the…