Recent posts

Invert Binary Tree

less than 1 minute read

Invert a binary tree. Left and right subtrees exchange.

Leaf-Similar Trees

1 minute read

Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence.

Binary Tree Tilt

1 minute read

Given a binary tree, return the tilt of the whole tree.

Subtree of Another Tree

2 minute read

Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s.