find shortest root in maze using recursion- C
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: find shortest root in maze using recursion- C

  1. #1
    Join Date
    Jan 2014
    Posts
    1

    find shortest root in maze using recursion- C

    Hey,

    I need to find the shortest path between two points in a maze using recursion. the maze is represented by a two-dimensional array of integers. You can walk through cells in the array if their values are different than -1. In addition, if there are some paths with the same length, the algorithm should find the path with the highest values in the array.

    I thought about an algorithm that checks all the possible paths, but I need something more efficient.

    Can someone please give me a pseudo code or an actual example in C? I'm really desperated and I'm running out of time

    thank you very much!

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,318

    Re: find shortest root in maze using recursion- C

    Perhaps you should read up on path finding algorithms like A*
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center