Invert a Binary Tree | Recursion Done Right

preview_player
Показать описание
Yes, we know mirrors don't swap left and right, they really push "front" through "back" 😂 but I think you get the idea in this problem.

Рекомендации по теме
Комментарии
Автор

I wish leetcode accepted more functional languages that support tail call optimizations. You wouldn't have to write an iterative solution to an inherently recursive problem at all!

samuraijosh
join shbcf.ru