Which traversal should be used to print nodes at k’th level of a binary tree where k is much less than total number of levels?

前端 未结 0 1214
Happy的楠姐
Happy的楠姐 2020-12-24 06:03

I don\'t know if traversal in this case matters because all traversal needs O(n) time so why prefer one over another. Please contradict me with a valid explanation.
Re

相关标签:
回答
  • 消灭零回复
提交回复
热议问题