## Maximum Sum Rectangle with Condition

Given a two-dimensional integer matrix matrix and an integer k, return the largest sum of a rectangle ≤ k.

Given a two-dimensional integer matrix matrix and an integer k, return the largest sum of a rectangle ≤ k.

You are given a list of integers nums and integer k. Return the maximum sum of elements that you can remove given that you must pop exactly k times, where ea...

Implement a data structure with the following methods:

Given a list of integers nums, which contains either -1 or 1, return the length of the longest sublist that sums to 0.

Given a list of list of positive integers stacks, you can take any stack(s) in stacks and pop any number of elements. Return the maximum sum that can be achi...

Given a list of integers nums and integers a and b, return the max sum of two non-overlapping sublists in nums which have lengths a and b.

Given a list of integers nums and an integer k, return the largest sum of three non-overlapping sublists of nums each of size k.

Given a list of integers nums, and integers k and target, return the number of sublists whose length is k and its average value ≥ target.

Given a list of integers nums, return the sum of a non-empty contiguous sublist with the largest sum.

You are given a two-dimensional integer list requested_trips containing [start_x, end_x, num_passengers], and an integer capacity. Each requested trip asks t...

You are given a list of integers nums and a two-dimensional list of integers operations. Each operation is of the following form: [L, R, X], which means that...

Implement a data structure with the following methods:

Given a list of integers nums and an integer target, return the number of sublists whose sum is equal to target.

You are given a list of integers nums. Return the minimum positive value we can append to the beginning of nums such that prefix sums of the resulting list c...

You are given a list of integers nums and an integer k. Given that you must first remove a sublist of length k, return the minimum resulting max(nums) - min(...

Given a list of integers nums and an integer k, return the maximum possible i where nums[0] + nums[1] + ... + nums[i] ≤ k. Return -1 if no valid i exists.

Given a list of integer nums, return the earliest index i such that the sum of the numbers left of i is equal to the sum of numbers right of i. If there’s no...

You’re given a string s consisting solely of "(" and ")". Return whether the parentheses are balanced.