h3solution

h3solution - Homework H3: Trees and Graphs Last Mod Date...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework H3: Trees and Graphs Last Mod Date Answers 1. There is not one correct concept map for these terms. Students that use all terms in a thoughtful and easy to understand Concept Map will receive full credit. 2. A data structure (or ADT) that could be used to store the information in the diagram shown is described as shown. TournamentTree Basically a Binary Tree that I fill in from the leaves to the root. The root when not null will be the winner of the tournament. Visibility Modifier Data or Return Type Identifier Description CONSTRUCTOR public constructor TournamentTree(S tring [] names) Initializes a data structure that holds names.length() teams in the first bracket. Each subsequent bracket holds half as many teams, since only the winners of each game in each bracket advance to the next bracket. The data structure will be a full (or at least complete) binary tree stored in an array with the first element skipped. The nodes of the tree will be initialized to -1, which indicates that the team in that spot is currently unknown. The winning team of the tournament will eventually be stored in the root node that is stored at index 1 of the array. Until each game is played, the winning team will not be assigned to the "parent" node. DATA MEMBERS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

h3solution - Homework H3: Trees and Graphs Last Mod Date...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online