Discussion Board
Go to the previous messageThere are no next messages
Current Forum: Homework 5 - Parts 1 and 2
Date: Thu Nov 8 2001 4:34 pm
Author: Lee, Peter <petel@cmu.edu>
Subject: Re: part 2, detecting visited pages efficiently...

Since the main purpose of part 2 of this assignment is to exercise your ability to implement a breadth-first traversal, using a linear search is OK. However, as you have pointed out, this will lead to an O(n^2) algorithm. So, if you'd prefer to use a hash table (e.g., the built-in one in the JDK), that would be a very good thing to do. But not required.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
part 2, detecting visited pages effici...      White, David      Thu Nov 8 2001 3:15 pm       
Re: part 2, detecting visited pages...      Lee, Peter      Thu Nov 8 2001 4:34 pm       

Back to previous screen