Flatten binary tree solution added.