Given a binary tree root, return the number of nodes that are an only child. A node x is an only child if its parent has exactly one child …
Teaching Kids Programming: Videos on Data Structures and Algorithms You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return whether all values in the tree are the same. Constraints n ≤ 100,000 where …
You are given a two dimensional array matrix, containing strings “r”, “g”, and “b”. Perform a floodfill operation at row r, column c with the color target. A floodfill …
Given the root to a binary tree root, return a list of two numbers where the first number is the number of leaves in the tree and the second …