Given the roots of two binary trees root and rootSub, check if there is a subtree of root with the same structure and node values as rootSub.
A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T.
In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.
A Linked List is a data structure in which the objects are arranged in a linear order. Unlike Arrays, you cannot access any element directly through its index.
Given the root of a binary tree, return its maximum depth.
A binary tree’s maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
A Topological sort of a Directed-Acyclic graph G is a linear ordering of all its vertices such that if G contains an edge E (u, v), then u appears before v in the ordering. And if the graph is not acyclic, then no linear ordering is possible.