Article tracker
4 articles in the last year
Quick lookup
Important LeetCode notes
Advice I’d Give to Anyone Starting Their LeetCode Journey (Including My Future Self)
I’ve learned that interview preparation isn’t about solving thousands of random problems. It’s about building the right habits, recognizing patterns, and learning how to think under pressure.
Open articleUnderstanding Big O Notation for LeetCode: The Complexity Cheat Sheet Every Beginner Needs
Big O notation measures the time complexity (or sometimes space complexity) of an algorithm. It doesn’t tell you exactly how many milliseconds your code takes—it tells you how the runtime grows as the input size (n) increases.
Open articlePatterns
Problems solved by pattern
Journey log
LeetCode write-ups
LeetCode 242: Valid Anagram – 3 Python Solutions Explained
Valid Anagram is a classic string problem that teaches different ways to compare the frequency of characters in two strings. While the problem is simple, it introduces an important concept you’ll use repeatedly in coding interviews: counting occurrences efficiently. In this post, we’ll explore three different Python solutions, understand how they work, and compare their time and space complexities. Problem Given two strings s and t, return True if t is an anagram of s; otherwise, return Fals
Solution: Leetcode 21 Solving the Merge Two Sorted Lists Problem in Python
You are given the heads of two sorted linked lists, list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.
Solution: Leetcode 155 Designing a MinStack with Constant Time Complexity in python
Design and implementation of a special kind of stack called a MinStack. The MinStack supports the usual stack operations such as push, pop, and top, but it also provides a method to retrieve the minimum element in constant time, O(1).
Solution: Leetcode 682 Solving a Baseball Scoring Puzzle with Python
You are keeping the scores for a baseball game with a unique set of rules. At the beginning of the game, you start with an empty record. You're given a list of strings operations, where each element represents an operation to apply to the record.
Solution: Leetcode 1929 Solving the Array Concatenation Problem in Python
You are given an integer array nums of length n. The task is to create a new array ans of length 2n such that ans[i] == nums[i] and ans[i + n] == nums[i] for 0 <= i < n (0-indexed). In simpler terms, the array ans is formed by concatenating two copies of the array nums.
Solution: Leetcode 26 Removing Duplicates from Sorted Array in Python
The problem at hand is to remove duplicates from a sorted integer array nums in-place, such that each unique element appears only once. Additionally, we need to return the number of unique elements present in the modified array.
Solution: LeetCode 88 Merge Sorted Array
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order.
