Leetcode 2415. Reverse Odd Levels of Binary Tree - 2 solutions: level order traversal; and recursion

Описание к видео Leetcode 2415. Reverse Odd Levels of Binary Tree - 2 solutions: level order traversal; and recursion

See other videos ‪@codeyao9796‬
Python solutions to Leetcode 2415. Reverse Odd Levels of Binary Tree. Here we share two formats of solutions: 1. level order traversal and repointing. 2. Recursion. For recursion, the two nodes for the worker function call are root.left and root.right at level 1 if they exist.

Комментарии

Информация по комментариям в разработке