2684. Maximum Number of Moves in a Grid
You are given a 0-indexed m x n matrix grid consisting of positive integers. You can start at any cell in the first column of the matrix, and traverse […]
You are given a 0-indexed m x n matrix grid consisting of positive integers. You can start at any cell in the first column of the matrix, and traverse […]
You are given an integer array nums. A subsequence of nums is called a square streak if: The length of the subsequence is at least 2,
Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. Example 1: Input: matrix = [
You are given the root of a binary tree with n nodes. Each node is assigned a unique value from 1 to n. You are also given an array queries of
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. If
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child
Given the root of a binary tree, replace the value of each node in the tree with the sum of all its cousins’
You are given the root of a binary tree and a positive integer k. The level sum in the tree is the sum of the
Given a string s, return the maximum number of unique substrings that the given string can be split into. You can split string s into any
Given two positive integers n and k, the binary string Sn is formed as follows: S1 = “0” Si = Si – 1 + “1”
Given an integer array nums, find the maximum possible bitwise OR of a subset of nums and return the number of different non-empty subsets with the maximum bitwise OR. An
A boolean expression is an expression that evaluates to either true or false. It can be in one of the following shapes: ‘t’ that evaluates to true.