Dec 31, 2025
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
Dec 31, 2025
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
Dec 31, 2025
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
Dec 31, 2025
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
Dec 31, 2025
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
Dec 31, 2025
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
Dec 30, 2025
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
Dec 30, 2025
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
Dec 30, 2025
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
Dec 29, 2025
In this problem, a tree is an undirected graph that is connected and has no cycles.
leetcodemediumunion-finddsugraphcycle-detectiondfs