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

[Easy] 270. Closest Binary Search Tree Value

Given the root of a binary search tree and a target value, return the value in the BST that is closest to the target. If there are multiple answers, print...
leetcodeeasybinary-search-treetreerecursionbinary-search

[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

Subscribe via RSS to stay updated