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...
leetcodemediumgreedyarray
Mar 21, 2026
Given an array of positive integers nums and an integer k, return the number of contiguous subarrays where the product...
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...
leetcodemediumdp
Mar 19, 2026
In an infinite chess board with coordinates from -infinity to +infinity, a knight starts at (0, 0). Return the minimum...
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)...
leetcodemediumdesignbinary-search
Mar 18, 2026
Design a hit counter that counts the number of hits received in the past 5 minutes (300 seconds).
leetcodemediumdesignqueue