• Moore Majority Vote Algorithm [LC150]

    Hello friends, Hope you’re doing well. Today we are going to discuss an important algo in software engineering called “Moore Majority vote”. We shall also try to implement it in C#. Let’s first talk about background work that is done prior to this algo and then we shall understand how it’s useful. Let’s take an…

  • YouTube System Design-1

    Hello friends, Hope you’re doing well. In today’s blog, let’s go though the system design of YouTube. In first part, we shall talk about the capacity estimation of upload engine of YouTube. Storage Estimation (Per Day): Let’s assume number of users – 1B No of users uploading videos = 1B / 1000 [1 in 1000]=…

  • What is Database Sharding?

    Database sharding is a method for horizontal scaling of databases, where the data is split across multiple database instances, called as shards. Sharding sometimes called as data partitioning. Sharding helps to improve performance and scalability. Advantages: Disadvantages: Type of Sharding: When to use sharding? Hope you liked the blog. Look forward to your comments/suggestion below.

  • Algorithm to get max profit from stock transactions [LC150]

    Hello friends, Today let’s go over the algorithm to find maximum profit out of stock buy and sell. Let’s first understand the problem statement. You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit. If you cannot achieve any profit, return…

  • Responsible AI for Sustainable future

    Hello friends, Hope you’re doing well. There is a huge buzz out there to adapt Artificial Intelligence in a growing number of use cases. While craze is understood especially with the kind of efficiency and productivity gain AI brings, however one needs to be mindful of the challenges as well that come along. In short,…

  • Insert an element at specific array position

    Hello friends, Let’s go through how can we add an element at specific array position. Let’s begin by adding the common code/caller. Common code: Now time has come to create basic method to allow insertion of any element in specific position. Approach-1 (Rudimentary)– Time complexity: O(n2) Now let’s refine the basic approach and find effective…

  • Big-O complexity of popular algorithms

    Hello folks- Hope you’re doing well. Big-O notations are very useful approach to show the worst case time complexity of any operation or algorithm. Big-O specifies the upper bound of a function in the asymptotic analysis and are widely used in the software development. Type Symbol Operation/ Algorithm Number of operations (n= 10) Execution Time…

  • String Reversal In Several Ways

    Reversing a string is a popular question in most campus hiring interviews. There could be several ways one can think of to do this. We will be looking at some of those. In this article we will not look at the Reverse method provided by the .NET libraries; we will instead try to implement it…

  • Ranges and indices in C# 8.0

    Hello friends, Today we will go through another C# 8 feature called Ranges and indices Range and Indices are the great additions in the C# world. Due to these constructs, handling indexes have become fairly easy. Below is a summary of the changes in this feature. System.Index represents an index in an array or sequence.…

  • Default Interface Implementation in C# 8.0

    Hello friends, Hope you are doing well. I am starting a series to go through the new C# 8 features one by one to cover all the new features and enhancements. C# 8 is getting released soon along with .NET Core 3.0 and it has several new features and enhancements to give more power to…