Create a new queue(traversalQueue) and add the root to the queue Create a list(resultsList) to hold the resulting traversal While the traversalQueue is not empty

Develop a pseudocode algorithm for a level-order traversal of a binary tree.

```
{
remove the first element from the traversalQueue and add it to the resultList
if it has children, add those children to the traversalQueue
}
```
return the resultList

Computer Science & Information Technology

You might also like to view...

Using Publisher templates, you can add text directly into text boxes or panel headings.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

There is a functional relationship between the height and weight of a person. For women who are 5 ft or taller, a function equation can be written to give the ideal weight of a woman based on her height. The rule used for many years by insurance companies stated that a woman 60 in. tall should weigh 100 lb and for those taller, an additional 5 lb should be added for every inch over 60 in. Write a linear function to predict the ideal weight of a woman 60 in. or taller based on this insurance rule. According to this rule, what is the ideal weight for a woman who is 5 ft 1 in.?

A. lb
B. lb
C. lb
D. lb
E. lb

Computer Science & Information Technology