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
Mar 31, 2026
Given an integer array nums where exactly two elements appear once and all other elements appear exactly twice, find the two elements that appear only once. Return them in any...
leetcodemediumbit-manipulation
Mar 30, 2026
You are given n train rides with distances dist[i]. Each train departs at an integer hour, so you must wait until the next whole hour to board the next train...
leetcodemediumbinary-search