Recent Posts
-
System Design 101: Large File Upload Design
•
Workflow for Large File Upload Design Initialize File Upload Session (File Creation Protocol) Client Action: The client starts by sending basic file metadata (e.g., filename, size) to the server. Server Response: The server returns a unique upload token that the client will use for all subsequent actions related to this…
-
LeetCode: 567 Permutation in String
•
LeetCode 567: Permutation in String Problem Description: Given two strings s1 and s2, write a function to check if s2 contains a permutation of s1. In other words, check if there exists a substring in s2 that is an anagram of s1. Code Implementation: from collections import Counter class Solution:…
-
Python 101: `defaultdict(set)`
•
defaultdict(set) is a special data structure from Python’s collections module that creates a dictionary with default values as sets. 1. Introduction to defaultdict defaultdict is a variant of a regular dictionary in Python, provided by the collections module. When you try to access a non-existent key, it won’t raise a…