Mar 25, 2026
Given a circular integer array nums, find the maximum possible sum of a non-empty subarray. A circular subarray can wrap around the end back to the beginning.
leetcodemediumdparraykadane
Mar 24, 2026
You are given a nested list of integers nestedList. Each element is either an integer or a list whose elements may also be integers or other lists. Implement an iterator...
leetcodemediumdesignstackiterator
Mar 22, 2026
There are n gas stations along a circular route. Station i has gas[i] units of gas. It costs cost[i] units to travel from station i to station i+1. Starting with...
leetcodemediumgreedyarray
Mar 21, 2026
Given an array of positive integers nums and an integer k, return the number of contiguous subarrays where the product of all elements is strictly less than k.
leetcodemediumsliding-windowtwo-pointers
Mar 20, 2026
You are given an array prices where prices[i] is the price of a stock on day i. Find the maximum profit with as many transactions as you like, subject to:...
leetcodemediumdp
Mar 19, 2026
In an infinite chess board with coordinates from -infinity to +infinity, a knight starts at (0, 0). Return the minimum number of moves to reach (x, y).
leetcodemediumbfs
Mar 19, 2026
Implement a SnapshotArray that supports: SnapshotArray(int length) – initializes an array of the given length (all zeros) void set(index, val) – sets the element at index to val int snap()...
leetcodemediumdesignbinary-search
Mar 18, 2026
Design a hit counter that counts the number of hits received in the past 5 minutes (300 seconds).
leetcodemediumdesignqueue
Mar 18, 2026
Given a binary tree, a node X is good if there is no node with a value greater than X on the path from root to X. Return the number...
leetcodemediumtreedfsbfs
Mar 17, 2026
A company has n employees numbered 0 to n-1. Each employee has exactly one direct manager given in manager[i], except the head of the company (manager[headID] == -1). An employee...
leetcodemediumtreedfsbfs