B4J Question How to prevent stack overflow?

Hi, I have written a piece of code that uses the "backtracking" algorithm to slove sudoku puzzles
If the puzzle is very simple for example no cell is filled or only one or two are filled it sometimes successfully completes the puzzle but when it gets more complex i get the "stack overflow" error
I guess that's because one of the subs has to call itself a lot of times.
I have attached the code.
Does anyone know how can this be solved?
Thanks.
 

Attachments

  • s.b4j.zip
    1.1 KB · Views: 209
Cookies are required to use this site. You must accept them to continue using the site. Learn more…