Assignment 7

Assignment 7 - CS 136 Fall 2009 Kate Larson Assignment 7...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CS 136 Fall 2009 Kate Larson Assignment 7 Due Tuesday, November 17, 2009, 10pm Language level : C To submit : tree.c, tree-driver.c, perrin.c and perrin-driver.c 1. In this question you will implement a tree in C. There are many ways to represent a tree, but one convenient representation is the left-child, right-sibling representation. We define a node in the tree as follows struct node{ int value; struct node * rightsibling; struct node * leftchild; struct node * parent; }; The first field contains the name of the node. The second field points to the right sibling of the node. The third field of the node is a pointer to the left-most child of the node. Finally, the fourth field is a pointer to the parent of the node. For example, a tree with root with value A , which has two children B and F , and where B has three children C , D , and E , is shown below. Note that B is the leftchild of A and that F is the rightsibling of B , and that A is the parent of both B and F ....
View Full Document

Page1 / 2

Assignment 7 - CS 136 Fall 2009 Kate Larson Assignment 7...

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