Stacks-Practice

Stacks-Practice - 15-121: Introduction to Data...

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: 15-121: Introduction to Data StructuresFall 2009Exercise10/04/2009Stacks PracticeDue: none Assignment: (worth 0 exercise points - this is for practice only) 1)Maze.Write a program that reads the description of a maze from a file. The maze is a two dimensional grid of Xs and Os. Xs are walls and O's are the path. The program should then search for a path through the maze and display the list of moves that should be made to get through the maze. The answer path should not repeat itself.It is up to you to determine how to signify beginning and end of the maze.2) Make modifications to the N-Queensproject looked at in class.Modify the program to add more pruning.before doing the recursion, check to see if the current set of queens is acceptable. If not, don't recurse.in deciding the possible set of queen locations, do NOT return all N^2 locations. In particular, consider the following:no sense in trying to put a queen on top of another existing queenif the previous queen is in row...
View Full Document

Page1 / 2

Stacks-Practice - 15-121: Introduction to Data...

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