Category: algorithms
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are …
Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible strings we could create. …
Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf …
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in …
Find the sum of all left leaves in a given binary tree. There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24. …