The Prefix Sum algorithm is a technique primarily used to efficiently calculate the sum of elements in a given range (i.e., sum of elements from index i to j) in an array….
Category: Tech Interviews
Sliding Window Algorithms
The sliding window technique is a method used in algorithm design to efficiently solve problems that involve contiguous subarrays or substrings of a given size or condition. It’s particularly useful when you…
System Design – Design Instagram
Designing a system like Instagram involves several key components and considerations. Here’s a high-level overview of the elements and architecture you would need to consider: Requirements: Capacity Estimation Assume we have 100…
Elasticsearch Architecture
Elasticsearch is a powerful and versatile search and analytics engine known for its scalability, speed, and ease of use. Its architecture has several key components and features that make it suitable for…
[Draft]Algorithms that You Have to Know[in go]
Make duplicate to zero Bubble Sorting
System Design – Ad-click/ad-show System
Designing a high-performance, high-throughput, and accurate distributed ad-show/ad-click system involves several key components, including system architecture, database selection, scalability solutions, and fault tolerance mechanisms. Life Cycles of Log-lines Collecting logs from various…
System Design – Top Songs for Each User
Designing a system to find the top 10 songs for each user involves several components and considerations, especially regarding scalability, performance, and fault tolerance. Below is an outline of the system components,…
System Design – Design a Web Crawler
Design a web crawler that fetches every page on en.wikipedia.org exactly 1 time. You have 10,000 servers you can use and you are not allowed to fetch a URL more than once. If a…
System Design – Notification System
Designing a system similar to Twilio, which is a cloud communications platform, requires careful planning and architecture to ensure high availability, scalability, and fault tolerance. Some basic requirements: Below is an overview…