Jan 25, 2026
You are given a 2D array of integers envelopes where envelopes[i] = [wi, hi] represents the width and the height of an envelope.
leetcodemediumarraydynamic-programmingbinary-searchsorting
Jan 25, 2026
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a...
leetcodemediumarraydynamic-programming
Jan 24, 2026
Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and...
leetcodemediumarraylinked-listdesignqueue
Jan 23, 2026
Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order.
leetcodemediumarraystringtriesorting
Jan 22, 2026
You are given a 2D integer array orders, where orders[i] = [price_i, amount_i, orderType_i] denotes that amount_i orders have been placed of type orderType_i at price price_i. The orderType_i is:...
leetcodemediumarrayheappriority-queuesimulation
Jan 21, 2026
You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right...
leetcodemediumarraydynamic-programmingmatrix
Jan 20, 2026
Given an m x n matrix mat, return an array of all the elements of the matrix in a diagonal order.
leetcodemediumarraymatrixsimulation
Jan 20, 2026
Given an integer array nums, rotate the array to the right by k steps, where k is non-negative.
leetcodemediumarray
Jan 20, 2026
This page collects ready-to-use C++ templates for every major binary search pattern you’ll encounter on LeetCode — from basic sorted-array lookup to rotated arrays, 2D matrices, and “search on the...
leetcodetemplatessearchbinary-search
Jan 20, 2026
Given an integer array nums and two integers lower and upper, return the number of range sums that lie in [lower, upper] inclusive.
leetcodehardarraydivide-and-conquer