Oct 8, 2025
Write an efficient algorithm that searches for a value target in an m x n integer matrix. This matrix has the following properties:
leetcodealgorithmmediumjavabinary-searchmatrix2d-arraydivide-conquersearchoptimizationproblem-solving
Oct 6, 2025
Given an array of integers nums, sort the array in ascending order and return it.
leetcodealgorithmmediumjavasortingmerge-sortheap-sortcounting-sortdata-structuresdivide-conquerproblem-solving
Oct 5, 2025
A city’s skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Given the locations and heights of all...
leetcodealgorithmhardjavasweep-linepriority-queuedata-structuresunion-findproblem-solving
Oct 4, 2025
You are given an array of strings equations that represent relationships between variables. Each string equations[i] is of length 4 and takes one of two different forms: "xi==yi" or "xi!=yi"....
leetcodealgorithmdata-structuresdisjoint-setgraphdfsmediumjavaconnected-componentsgraph-coloringproblem-solving
Oct 3, 2025
Given an integer n, return the number of structurally unique BST’s (binary search trees) that have exactly n nodes with values from 1 to n.
leetcodealgorithmdynamic-programmingdata-structuresmathcatalan-numbersmediumjavabinary-search-treesproblem-solving
Sep 30, 2025
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
leetcodealgorithmbacktrackingdata-structuresstringpalindromerecursionmediumjavapartitioningproblem-solving
Sep 29, 2025
This is a classic backtracking problem that requires generating all possible combinations of k numbers chosen from the range [1, n]. The key insight is using DFS with backtracking to...
leetcodealgorithmbacktrackingdata-structuresrecursionmediumjavacombinationsdfsproblem-solving
Sep 25, 2025
An n-bit gray code sequence is a sequence of 2^n integers where:
leetcodealgorithmbacktrackingdata-structuresrecursionbit-manipulationmediumjavagray-codeproblem-solving
Sep 25, 2025
Given an m x n matrix, return all elements of the matrix in spiral order.
leetcodealgorithmmatrixdata-structuressimulationtraversalmediumjavaspiral-matrixproblem-solving
Sep 25, 2025
Implement pow(x, n), which calculates x raised to the power n (i.e., x^n).
leetcodealgorithmmathdata-structuresrecursionbit-manipulationmediumjavapowproblem-solving