2490. Circular Sentence
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, “Hello World”, “HELLO”, “hello world […]
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, “Hello World”, “HELLO”, “hello world […]
A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum possible number of characters from s to make it fancy. Return the
There are some robots and factories on the X-axis. You are given an integer array robot where robot[i] is the position of the ith robot. You
You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 <
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