CPSC 335 Midterm Exam Question Superset
A. The following questions ask you to compare 4 different data structures: Balanced BST (Red-Black
Tree), Binary Digital Search Tree, Binary Trie and a Hash Table using coalesced hashing with linear
probing. As a st
import java.util.ArrayList;
public class DiGraphList cfw_
class Vertex cfw_
int id;
Vertex(int anId) cfw_
id = anId;
ArrayList<Edge> adjacencyList = new ArrayList<Edge>();
void addEdge(Edge outgoingEdge) cfw_
assert(outgoingEdge.start = this);
if (!adjac
CPSC 335 - Winter 2012
Assignment 1
1
Goal
The goal of this assignment is to use Branch and Bound to explore the State-Space Graph of the Tic-Tac-Toe
game and nd a path to a winning conguration (for any player).
2
Tic-Tac-Toe State-Space Graph
Tic-Tac-Toe
Background
This assignments requires you to create an AI for the two-player game Pop 10. It is a variation on the FourIn-A-Row game and the description can be found on Wikipedia.
Pop10 Game Tree
There are three distinct moves that a Pop10 player must make
Background
"There are some engineering situtations that require no more than a "textbook" data structure - such as a
doubly linked list, a hash table, or a binary search tree - but many others require a dash of creativity. only in
rare situations will you
Background
This assignments requires you to create an existance Trie to be used to suggest word completions as a user
types a string in a text eld.
Provided Interface
An implementation that allows a user to enter a word and provides space to suggest possi
Background
This assignment expands on the previous assignment. The goal is again to test for the existance of a word, but
in this case you will be using a hash table and thus don't need to do word completions.
You will be asked to empirically compare the
CPSC 335 Final Exam Question Superset
A. Spatial Data Structures
This set of questions will ask you to consider and compare the 5 different spatial data structures we
discussed during the semester: Fixed Grid, Grid Files, Quad Trees, kD Trees and R-Trees
package pop10game.model;
/*
* Class: Pop10Board
* Author: Nathaly Verwaal
* Date: June 2011
*/
import java.util.ArrayList;
import pop10game.controller.Pop10BoardListener;
import pop10game.controller.Pop10BoardEvent;
/*
* This class manages the board for a