Please let me know the Big Oh of the above.
Share
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.
Think about how an algorithm executing these traversals would look like – what data structure would you use (stack, queue, something else?) and how many operations would you need to execute for processing each node in the tree? Would you ever have to process a node in the tree twice at all?