Let’s say theres a binary tree like that.

I’d like to read it floor by floor (from left to the right) so the output would look like:
2 4 5 3 1 3 9
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Its Printing in
BFS, You should use auxiliary data-structure Queue: Learn herelisted below is pseudocode for a simple queue based level order traversal,