Welcome to My Technical Blog

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

169+ 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

[Medium] 274. H-Index

Given an array of integers citations where citations[i] is the number of citations a researcher received for their i-th paper,...
leetcodemediumsorting

All Posts

[Hard] 685. Redundant Connection II

In this problem, a rooted tree is a directed graph such that there is exactly one node (the root) for which all other nodes are descendants of this node, plus...
leetcodehardunion-finddsugraphcycle-detectiondirected-graph

[Medium] 285. Inorder Successor in BST

Given the root of a binary search tree (BST) and a node p in it, return the in-order successor of that node in the BST. If the given node has...
leetcodemediumbinary-search-treetreeinorder-traversal

[Medium] 487. Max Consecutive Ones II

Given a binary array nums, return the maximum number of consecutive 1’s in the array if you can flip at most one 0.
leetcodemediumarraydynamic-programmingsliding-window

[Easy] 661. Image Smoother

An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the average of the cell...
leetcodeeasymatrixarraysimulation

[Medium] 616. Add Bold Tag in String

You are given a string s and an array of strings words. You should add a closed pair of bold tag <b> and </b> to wrap the substrings in s...
leetcodemediumstringarraygreedy

[Medium] 681. Next Closest Time

Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit can be...
leetcodemediumstringsimulationbrute-force

[Medium] 683. K Empty Slots

You have n bulbs in a row numbered from 1 to n. Initially, all the bulbs are turned off. On day i (for i from 0 to n-1), we turn...
leetcodemediumsliding-windowtwo-pointersarray

[Medium] 686. Repeated String Match

Given two strings a and b, return the minimum number of times you should repeat string a so that string b is a substring of it. If it is impossible...
leetcodemediumstring-matchingkmprabin-karprolling-hash

[Medium] 684. Redundant Connection

In this problem, a tree is an undirected graph that is connected and has no cycles.
leetcodemediumunion-finddsugraphcycle-detectiondfs

[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

Subscribe via RSS to stay updated