1717. Maximum Score From Removing Substrings
You are given a string s and two integers x and y. You can perform two types of operations any number of times. Remove substring “ab” and […]
You are given a string s and two integers x and y. You can perform two types of operations any number of times. Remove substring “ab” and […]
Given a binary tree and an integer target, check whether there is a root-to-leaf path with its sum as target. Examples : Input: tree
You are given a string s that consists of lower case English letters and brackets. Reverse the strings in each pair of
You are given a square binary grid. A grid is considered binary if every value in the grid is either 1 or
The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are described below: “../” :
Given a binary matrix mat of size n * m, find out the maximum length of a side of a square sub-matrix with all 1s. Examples: Input:
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome
You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in the tree represents a number. For
Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two
Given the root of a binary tree, return the inorder traversal of its nodes’ values. Example 1: Input: root = [1,null,2,3] Output: [1,3,2]
A message containing letters from A-Z can be encoded into numbers using the following mapping: ‘A’ -> “1” ‘B’ -> “2” … ‘Z’ ->
Given a rows x cols binary matrix filled with 0‘s and 1‘s, find the largest rectangle containing only 1‘s and return its area. Example 1: Input: matrix =