Week 7 of the course

Self-study

The topics for this week are (i) Graphs and Trees, (ii) Tree data structures and traversals and (iii) Invalidation in containers

The following links will take you to the video-lectures and the accompanying slides:

Trees

With regard to a general rooted tree, which of the following are true? (Note: more than 1 statement may be true.)
Suppose we are considering the subtrees of node \(x\) in some rooted tree. Which of the following is true?
Suppose we are considering a rooted tree whose height is 4. Which of the following statements is always true?
Let \(x\) be a node in a rooted tree. A descendant of node \(x\) is any node in any subtree of \(x\). Which of the following statements is always true?

Tree data structures and traversals

Assume a node in a binary tree is stored using children pointers left_child and right_child. If the entire binary tree has 4 nodes, how many of these children pointers will be equal to nullptr?
Which of the following best describes the difference between how a node is stored in a general rooted tree and how a node is stored in binary tree?
Suppose we perform preorder and postorder traversals on an entire rooted tree having at least two nodes. Which of the following is true?
Three tree traversals were presented, preorder, postorder and inorder. In what way does inorder differed from the other two traversals?

Invalidation

With regard to invalidation and different STL containers, which of the following statements is true? (More than 1 statement may be true.)
What can be said in general about invalidation and iterators, pointers and indices?
What does invalidation cause when using an STL container?
What is a central question, related to this course, whose answer can be found in this week’s videos?
Of the following topics, which do you think deserves further discussion/explanation during the weekly consultation session?
Were there any parts of the video lectures that were particularly difficult? Particularly interesting? Something about which you wish to learn more?

Extra links on the topic:

Week07 - Glossary

Submit weekly exercises

Questions to be submitted this week