1530. Number of Good Leaf Nodes Pairs
You are given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is […]
You are given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is […]
Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a
You are given the root of a binary tree with n nodes. Each node is uniquely assigned a value from 1 to n. You are also given an integer startValue representing
You are given a 2D integer array descriptions where descriptions[i] = [parenti, childi, isLefti] indicates that parenti is the parent of childi in a binary tree of unique values. Furthermore, If isLefti == 1, then childi is
Given a string formula representing a chemical formula, return the count of each atom. The atomic element always starts with an uppercase character,
There are n 1-indexed robots, each having a position on a line, health, and movement direction. You are given 0-indexed integer arrays positions, healths, and a string directions (directions[i] is
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 that consists of lower case English letters and brackets. Reverse the strings in each pair of
The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are described below: “../” :
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