I am currently rewriting one of my programs. It has a heavily recursive function which solves peg-solitaire:
int solve(int draw){
if(finished())
return true;
//loop over every possible move (about 76 long long values)
//do a move (access the board, which is a long long value)
if(solve(int draw + 1))
return true;
return false;
}
So i was wondering if it's faster to use solve like this:
solve(int draw, long long ** moves, long long * board){}
At the moment both moves and board are global variables.
Of course i am going to test it, but if someone tells me that this attempt isn't going to be efficient i will save some time :).
best regards