Problem: Leetcode 112 – Path Sum Description: Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all…
Author: user
Leetcode 199 – Binary Tree Right Side View
Problem: Leetcode 199 – Binary Tree Right Side View Description: Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes…
Leetcode 17 – Letter Combinations of a Phone Number
Description: Given a string containing digits from 2 to 9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapping of digit to…
Setup multiple SSH Keys to different github accounts
Setting up multiple SSH keys for different GitHub accounts on the same machine is useful if you manage multiple GitHub accounts, such as a personal account and a work account. Here are…
System Design – Components&Concepts
Scalability Scalability refers to the ability of a system, network, or process to handle a growing amount of work or its potential to be enlarged in order to accommodate that growth. In…
System Design – Booking/Reservation System
Overview of the Ticket Booking System Event Data Schema Creating a data schema for a ticket selling or reservation system requires a thoughtful approach to handle events, venues, tickets, customers, and reservations….
PrefixSum Algorithm
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….
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 -Online Auction Website
Designing an online auction system involves several key components and considerations. Let’s break down the system design into various segments: 1. Functional Requirements 2. Non-Functional Requirements 3. System Architecture 3.1 Frontend 3.2…
System Design – Top 10 favorite songs for users
Designing a system to aggregate and deliver the top 10 favorite songs for each of 1 billion users is a complex task that requires careful consideration of scalability, efficiency, and data management….