Post by Eric on Feb 8, 2008 2:43:04 GMT
Programming Challenges
If you are unfamiliar with these, check this thread:
Programimng Challenges Start
Ranking of Challenge #2
Points:
Wrighty(1): 13
Chantry(1): 10
Ross(2): 18
Programming Challenge Number 3
And here's the third challenge. This challenge is a slightly more realistic problem solving challenge. The objective in this challenge is to create a function/script/object that can trail its way through a maze.
Let me get into the details. The maze/map will be represented by a two-dimensional array. The top left corner (0, 0) represents the starting point. The bottom right corner represents the ending point. The maze should be able to be any size, so basically I'm saying that shouldn't be programmed in.
In the array, a 1 (one) will represent the path, and a 0 (zero) will represent walls.
The program will take this array, and starting at the starting point find it's way through the maze. The path taken through the maze should be modified into the array using the value 2. So from the starting to ending point there will be a little trail of twos going over some part where there used to be ones.
Then, somehow the solved array should be returned or output to the screen--your choice.
Yes, I know the details of this challenge are a bit more vague, but I didn't want to limit what you could do, so bleh.
This challenge, like the last one, will be worth 10 points.
If you are unfamiliar with these, check this thread:
Programimng Challenges Start
Ranking of Challenge #2
- Ross - Good job with this. You were the only one to complete it, but nonetheless it was well written. The only thing that you could have improved was the checking for brackets/parentheses, other than that it was grade A work!
Points:
Wrighty(1): 13
Chantry(1): 10
Ross(2): 18
Programming Challenge Number 3
And here's the third challenge. This challenge is a slightly more realistic problem solving challenge. The objective in this challenge is to create a function/script/object that can trail its way through a maze.
Let me get into the details. The maze/map will be represented by a two-dimensional array. The top left corner (0, 0) represents the starting point. The bottom right corner represents the ending point. The maze should be able to be any size, so basically I'm saying that shouldn't be programmed in.
In the array, a 1 (one) will represent the path, and a 0 (zero) will represent walls.
The program will take this array, and starting at the starting point find it's way through the maze. The path taken through the maze should be modified into the array using the value 2. So from the starting to ending point there will be a little trail of twos going over some part where there used to be ones.
Then, somehow the solved array should be returned or output to the screen--your choice.
Yes, I know the details of this challenge are a bit more vague, but I didn't want to limit what you could do, so bleh.
This challenge, like the last one, will be worth 10 points.