2257. Count Unguarded Cells in the Grid
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 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
You are given an array nums of non-negative integers and an integer k. An array is called special if the bitwise OR of all of its elements is at least k.
You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 <= i < n –
You are given a sorted array nums of n non-negative integers and an integer maximumBit. You want to perform the following query n times: Find a non-negative integer k <
The bitwise AND of an array nums is the bitwise AND of all integers in nums. For example, for nums = [1, 5, 3], the bitwise
You are given a 0-indexed array of positive integers nums. In one operation, you can swap any two adjacent elements if they have the same number of set bits. You
You are given a 0-indexed binary string s having an even length. A string is beautiful if it’s possible to partition it into one or more
Given a string word, compress it using the following algorithm: Begin with an empty string comp. While word is not empty, use the following operation: Remove
Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost