Abstract

The objective of this study is to present an efficient tree traversal algorithm in terms of execution time and implementation complexity. Trees, defined as acyclic connected graphs, are widely used in various fields of computer science. Unlike traditional recursive methods or depth first search implementations, this research proposes an implementation based on breadth first search. The algorithm improves execution time using a non-recursive approach and reduces implementation complexity by using only one-dimensional arrays and loops. Additionally, the algorithm has been optimized through a preprocessing phase. To evaluate the performance of the proposed algorithm compared to existing ones, trees with random structures were generated and their execution times were measured. The results demonstrated that the proposed algorithm exhibits efficient performance.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call