简体   繁体   中英

Algorithm binary tree makes a path by level of T with complexity O (n)

Hey guys I have a doubt to resolve this issue, someone could help me?

A level path in a binary T tree visits all T nodes per level (first level 0 followed by levels 1, 2, 3...) where nodes of the same level are visited from left to right.

Write an algorithm that receives as input a binary tree T and makes a path by level of T with complexity O (n), where n is the number of nodes of T.

Using pseudocode:)

Hey guys I have a doubt to resolve this issue, someone could help me?

A level path in a binary T tree visits all T nodes per level (first level 0 followed by levels 1, 2, 3...) where nodes of the same level are visited from left to right.

Write an algorithm that receives as input a binary tree T and makes a path by level of T with complexity O (n), where n is the number of nodes of T.

Using pseudocode:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM