Search:

Type: Posts; User: Norm

Search: Search took 0.14 seconds.

  1. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    The only way I know to find logic problems is to debug the code while it is running. If you don't have an interactive debugger, use lots of println statements to show variables' values and execution...
  2. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    Where in the code does it detect that it has visited an edge?
    Where does the code backtrack to a node?
  3. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    Read the code's comments does not tell me anything about what the code is trying to do.
    Where does it "stop" or "backtrack"?
    "stops in 1" and "backtrack to 5" have no meaning
  4. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    Looks like an infinite loop.

    Try debugging by adding some printlns to show the values that are being used to see why it is not stopping.
  5. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    Can you post the full text of the error message.
    One reason you get an exception is if the stack is empty.
  6. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    What are your java programming questions?
  7. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    Is this an algorithm question
    or do you have the algorithm and want help coding it in java?
    I might be able to help with the second one.
  8. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    What does the program do now? Can you post its output and explain what is wrong with the output and show what the output should be?
  9. Replies
    18
    Views
    4,424

    Re: Euler Paths with dfs algorithm problem

    For testing can you make a main method that loads the Graph from the program without any user input required. That way everyone will be working with the same graph and testing will be faster...
Results 1 to 9 of 9