2097. Valid Arrangement of Pairs
You are given a 0-indexed 2D integer array pairs where pairs[i] = [starti, endi]. An arrangement of pairs is valid if for every index i where 1 <= i < pairs.length, we […]
You are given a 0-indexed 2D integer array pairs where pairs[i] = [starti, endi]. An arrangement of pairs is valid if for every index i where 1 <= i < pairs.length, we […]
You are given a m x n matrix grid consisting of non-negative integers where grid[row][col] represents the minimum time required to be able to visit the cell (row, col), which means
You are given a 0-indexed 2D integer array grid of size m x n. Each cell has one of two values: 0 represents an empty cell, 1 represents an obstacle that
You are given an integer n and a 2D integer array queries. There are n cities numbered from 0 to n – 1. Initially, there is a unidirectional road from
There are n teams numbered from 0 to n – 1 in a tournament; each team is also a node in a DAG. You are given the
On an 2 x 3 board, there are five tiles labeled from 1 to 5, and an empty square represented by 0. A move consists of choosing 0 and a
You are given an n x n integer matrix. You can do the following operation any number of times: Choose any two adjacent elements of matrix and multiply each of them
You are given an m x n binary matrix matrix. You can choose any number of columns in the matrix and flip every
You are given two integers m and n representing a 0-indexed m x n grid. You are also given two 2D integer arrays guards and walls where guards[i] = [rowi, coli] and walls[j] =
You are given a string s consisting of the characters ‘a’, ‘b’, and ‘c’ and a non-negative integer k. Each minute, you may take either the leftmost character of s,
You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the
You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length