Oct 6, 2025
Given an array of integers nums, sort the array in ascending order and return it.
leetcodealgorithmmediumcppsortingmerge-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...
leetcodealgorithmhardcppsweep-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-setgraphdfsmediumcppconnected-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-numbersmediumcppbinary-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-structuresstringpalindromerecursionmediumcpppartitioningproblem-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-structuresrecursionmediumcppcombinationsdfsproblem-solving
Sep 25, 2025
An n-bit gray code sequence is a sequence of 2^n integers where:
leetcodealgorithmbacktrackingdata-structuresrecursionbit-manipulationmediumcppgray-codeproblem-solving
Sep 25, 2025
Given an m x n matrix, return all elements of the matrix in spiral order.
leetcodealgorithmmatrixdata-structuressimulationtraversalmediumcppspiral-matrixproblem-solving
Sep 25, 2025
Implement pow(x, n), which calculates x raised to the power n (i.e., x^n).
leetcodealgorithmmathdata-structuresrecursionbit-manipulationmediumcpppowproblem-solving
Sep 24, 2025
This is a classic dynamic programming problem that requires finding the number of unique paths from top-left to bottom-right of a grid. The key insight is recognizing the overlapping subproblems...
leetcodealgorithmdynamic-programmingdata-structuresgridcombinatoricsmediumcppunique-pathsproblem-solving