Question 6

Write a function that does an in-order traversal of a tree and prints out the contents (Assume each node has 1 piece of content which is an integer).
Write this function without using recursion (you can assume a library that has stack/queue/list objects with some standard methods is available for use by you).
What is the maximum size your stack can grow to and what is the expected size that your data structure can grow to assuming that the tree has n nodes?

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

Ask Us How You Can Get Your First Dream Job 😉

Fill in the form below to book a 30 min no-obligation consulting session.