Feb 3rd, 2012
Studypool Tutor
Price: $20 USD

Tutor description

The file has answered question in Data structure and algorithm

Word Count: 835
Showing Page: 1/5
UNIT NAME: DATA STRUCTURES AND ALGORITHMSQUESTION 1(a) Define the following terms as used in trees: (3 marks) (i) ChildIn a binary search tree structure a node can have successor nodes called children and the children can also have their own child node. A child is a set of nodes that have incoming edges from the same node are said to be the children of that node(ii) ParentA node is the parent of all nodes if it connects to with outgoing edges A is a parent to B and C and B and C are children of A(iii) TraversalTo traverse a binary tree is to visit each node in a tree exactly once in some order either. Traversal strategies can be specified by the ordering of the three objects to visit: Current node, Right subtree and the left subtree. There are three strategies; Preorder - Root (current node)-Left-Right,Inorder - left- Root-Right, PostOder - Left-Right-Root(b) For the following graph find the adjacency matrix and adjacency list representation of the graph. (7 marks)Adjacency List representation For each vertex we keep a linked list of vertices that are adjacent to it. It uses space proportional to /E/ + /V/A: B-G-FB: A-C-GC: B-D-GD: C-E-GE: D-F-GF: A-E-GG: A-B-C-D-E-FAdjacency MatrixFor a graph with N nodes, an N by N table shows the existence and weights of all edges in the graph.(c).Using rel

Review from student

Studypool Student
" Excellent job "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1819 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors