Part 9 - Adjacency List Code in Python

preview_player
Показать описание
This is Part 9 of our complete Tutorial in Binary Tree coded in Python. In this part, we write the Python code to generate the Adjacency matrix.

🔥 This is a Complete Tutorial Series on Binary Trees

Solutions to Other Binary Tree Challenges

🔥 Python Tutorials here

🔥 Data Science Tutorial

My websites

Pleas join us at International Computer Programmers here:

Feel free to connect with me

Your support can help me improve my content:
Рекомендации по теме
Комментарии
Автор

You can do it without else, since you have a return in the if statement. Also you can call makeList(r.right) before the 2 ifs and the function will do exactly the same.

xaoccc
Автор

Thank you! Your videos were very helpfool. I understand better now.

Лена-вны
Автор

The print can be done like this: for key, value in aList.items():
print(key, value)

xaoccc