Stories, Tutorials
& Life Tips
Deep dives on coding, health, recipes, travel and everything in between.
π Explore Reading Paths
Follow curated journeys from beginner to expert
How to Design a web crawler
Step 1: Outline use cases and constraintsGather requirements and scope the problem. Ask questions to clarify use cases and constraints. Discuss assumptions. Without an interviewer to address clarifyinβ¦
How to Design the Twitter timeline and search
Design the Facebook feed and Design Facebook search are similar questions. Step 1: Outline use cases and constraintsGathβ¦
How to Design Pastebin.com (or Bit.ly)
Design Bit.ly - is a similar question, except pastebin requires storing the paste contents instead of the original unshoβ¦
How to approach a system design interview question?
The system design interview is an open-ended conversation. You are expected to lead it. You can use the following steps β¦
Teemo Attacking - Array - Medium - LeetCode
In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, giveβ¦
Circular Array Loop - Array - Medium - LeetCode
You are given a circular array nums of positive and negative integers. If a number k at an index is positive, then move β¦
Find All Duplicates in an Array - Array - Medium - LeetCode
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Fβ¦
Insert Delete GetRandom O(1) - Array - Medium - LeetCode
Implement the RandomizedSet class: bool insert(int val) Inserts an item val into the set if not present. Returns true ifβ¦
Game of Life - Array - Medium - LeetCode
According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by tβ¦
Find the Duplicate Number - Array - Medium - LeetCode
Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is β¦
Product of Array Except Self - Array - Medium - LeetCode
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the produβ¦
Majority Element II - Array - Medium - LeetCode
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Follow-up: Could β¦
Combination Sum III - Array - Medium - LeetCode
Find all valid combinations of k numbers that sum up to n such that the following conditions are true: Only numbers 1 thβ¦
Minimum Size Subarray Sum - Array - Medium - LeetCode
Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of whicβ¦
Rotate Array - Array - Medium - LeetCode
Given an array, rotate the array to the right by k steps, where k is non-negative. Follow up: Try to come up as many solβ¦