959. Regions Cut By Slashes
An n x n grid is composed of 1 x 1 squares where each 1 x 1 square consists of a ‘/’, ‘\’, or blank space ‘ ‘. These […]
An n x n grid is composed of 1 x 1 squares where each 1 x 1 square consists of a ‘/’, ‘\’, or blank space ‘ ‘. These […]
A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all
You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and
Convert a non-negative integer num to its English words representation. Example 1: Input: num = 123 Output: “One Hundred Twenty Three” Example
You are given a string word containing lowercase English letters. Telephone keypads have keys mapped with distinct collections of lowercase English letters, which can
A distinct string is a string that is present only once in an array. Given an array of strings arr, and an integer k, return the kth distinct string present
You are given the array nums consisting of n positive integers. You computed the sum of all non-empty continuous subarrays from the array and
You are given two integer arrays of equal length target and arr. In one step, you can select any non-empty subarray of arr and reverse it. You
A swap is defined as taking two distinct positions in an array and swapping the values in them. A circular array is defined as an array
You are given a 0-indexed array of strings details. Each element of details provides information about a given passenger compressed into a string of length 15.
You are given an array books where books[i] = [thicknessi, heighti] indicates the thickness and height of the ith book. You are also given an integer shelfWidth.
You are given a string s consisting only of characters ‘a’ and ‘b’. You can delete any number of characters in s to make s balanced. s is balanced if there is no