Welcome to My Technical Blog

Exploring algorithms, data structures, and software engineering insights through detailed LeetCode problem solutions

313+ Problems Solved
3 Difficulty Levels
20+ Categories

Latest Posts

[Medium] 221. Maximal Square

Given an m x n binary matrix filled with '0's and '1's, find the largest square containing only '1's and...
leetcodemediumdynamic-programming

All Posts

[Medium] 1976. Number of Ways to Arrive at Destination

You are in a city that consists of n intersections numbered from 0 to n - 1 with bi-directional roads between some intersections. The inputs are generated such that you...
leetcodemediumdijkstrashortest-pathgraphdynamic-programming

[Medium] 547. Number of Provinces

There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city...
leetcodealgorithmmediumjavadisjoint-setdfsgraphproblem-solving

[Medium] 399. Evaluate Division

You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [Ai, Bi] and values[i] represent the equation Ai / Bi =...
leetcodealgorithmmediumjavadisjoint-setgraphdfsproblem-solving

[Medium] 690. Employee Importance

You have a data structure of employee information, including the employee’s unique ID, importance value, and direct subordinates’ IDs.
leetcodealgorithmmediumjavadfsbfshash-tableproblem-solving

[Hard] 850. Rectangle Area II

You are given a 2D array of axis-aligned rectangles. For each rectangle[i] = [xi1, yi1, xi2, yi2], where (xi1, yi1) is the bottom-left corner and (xi2, yi2) is the top-right...
leetcodealgorithmhardjavageometrysweep-linesegment-treeproblem-solving

[Medium] 286. Walls and Gates

You are given an m x n grid rooms initialized with these three possible values:
leetcodealgorithmmediumjavaarraymatrixbfsproblem-solving

[Medium] 279. Perfect Squares

Given an integer n, return the least number of perfect square numbers that sum to n.
leetcodealgorithmmediumjavamathdynamic-programmingbfsproblem-solving

Algorithm Templates: Greedy

Greedy algorithms are among the most elegant tools in competitive programming — when they work, they’re simpler and faster than dynamic programming. This guide covers the core greedy patterns you’ll...
leetcodetemplatesgreedy

[Easy] 346. Moving Average from Data Stream

Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window.
leetcodealgorithmeasyjavaqueuesliding-windowdesignproblem-solving

[Medium] 994. Rotting Oranges

You are given an m x n grid where each cell can have one of three values:
leetcodealgorithmmediumjavaarraymatrixbfsproblem-solving

Subscribe via RSS to stay updated