Apr 15, 2026
You are given two linked lists: list1 and list2 of sizes n and m respectively. Remove list1’s nodes from the a-th node to the b-th node (0-indexed), and put list2...
leetcodemediumlinked-list
Apr 13, 2026
You are given an array of events where events[i] = [startDay, endDay]. You can attend an event on any single day in the range [startDay, endDay]. You can only attend...
leetcodemediumgreedyheap
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