More C++ Answers
Question Library
Ask a question about C++
Volunteer
Experts of the Month
Expert Login
Awards
About Us
Tell friends
Link to Us
Disclaimer
|
| |
|
|
| |
| | | |
About Zlatko
Expertise I can answer questions about C / C++ programming, software design, algorithms, and interprocess communication. I have access to Microsoft Visual Studio and gcc as my development platforms.
If I'm maxed out here, try me in the C category.
Experience I have been developing software professionally in C and C++ for UNIX and Microsoft Windows since 1991.
Education/Credentials I have a Bachelor of Applied Science in Computer Engineering from the University of Waterloo located in Waterloo, Ontario, Canada. I hold the IEEE Certified Software Development Professional designation and SUN Java Programmer and Java Developer credentials.
| | |
| |
You are here: Experts > Computing/Technology > C/C++ > C++ > maze algorithm
C++ - maze algorithm
Expert: Zlatko - 10/30/2009
Question Hi,
I was taken an experiment that is the solution of maze problem, but I cannot solve it.I can find only one solution in the maze with my algorithm, but I must find all possible paths in maze.Also, your sites' Java part provides a solution for maze but only one path.
Please help me.Can you give me an algorithm for it or source code?Thank you very much.
Answer Hello John. I'm happy to help but I cannot say why you are finding only one solution without seeing your code. I can guess that it would be pretty easy to change your code to find all solutions. I suspect that you are using some kind of recursive search algorithm with backtracking. The trick would be to not stop the recursion after the first solution.
Please post your code. If the maze data is in some kind of file, post that too. If you are worried about others seeing your code, make a new private question or send it to zlatko.c.help at gmail.com
Best regards
Zlatko
Add to this Answer Ask a Question
|
|