Apr 12, 2026
Given an integer n, return a list of all possible full binary trees with n nodes. Each node has value 0. A full binary tree is a tree where every...
leetcodemediumtreerecursionmemoization
Apr 11, 2026
Given an array nums, find two indices i and j (i != j) such that the digit sum of nums[i] equals the digit sum of nums[j], and return the maximum...
leetcodemediumhash-maparray
Apr 10, 2026
You are given a list of tasks to complete in order. Each day you can complete one task. After completing a task of type t, you must wait at least...
leetcodemediumhash-mapsimulation
Apr 9, 2026
Given an integer array nums and an integer k, find the maximum sum among all subarrays of length k that have all distinct elements. Return 0 if no such subarray...
leetcodemediumsliding-windowhash-map
Apr 8, 2026
Given a singly linked list, return a random node’s value. Each node must have an equal probability of being chosen.
leetcodemediumlinked-listrandomized
Apr 7, 2026
Given a palindromic string palindrome, replace exactly one character to make it not a palindrome, and make the resulting string the lexicographically smallest possible. Return the result, or an empty...
leetcodemediumstringgreedy
Apr 6, 2026
You are given a 0-indexed integer array nums of length n. A split at index i is valid if the sum of the first i + 1 elements is greater...
leetcodemediumprefix-sumarray
Apr 5, 2026
You are given an integer array pref of size n. Find and return the array arr of size n that satisfies:
leetcodemediumbit-manipulationprefix
Apr 2, 2026
Given an m x n integer matrix, if an element is 0, set its entire row and column to 0. You must do it in place.
leetcodemediummatrixarray
Apr 1, 2026
Given n nodes labeled 0 to n-1 and a list of undirected edges, determine if these edges form a valid tree.
leetcodemediumgraphdsudfs