Insights on LeetCode Algorithms and Problem Solving.

Explore my detailed write-ups on tackling various LeetCode problems, including strategies, solutions, and optimization tips, all organized in chronological order.

DFS vs BFS: Understanding the Differences

Depth-First Search (DFS) and Breadth-First Search (BFS) are two fundamental graph traversal algorithms. Learn how they work, their differences, and when to use each one.

Understanding Difference Arrays

Difference arrays are a powerful tool for efficiently performing range update operations. Learn how difference arrays work, how to implement them, and their applications.

Understanding KMP Algorithm

KMP (Knuth-Morris-Pratt) is a string-matching algorithm that searches for occurrences of a "needle" within a "haystack". Learn how KMP works and how to implement it in your code.

Understanding Union-Find

Union-Find is a data structure that keeps track of a partition of a set into disjoint subsets. Learn how Union-Find works and how to implement it in your code.