I am trying to write a C++ program that works like the game 24. For those who don\'t know how it is played, basically you try to find any way that 4 numbers can total 24 th
One thing that might make this faster than normal is parallelisation. Check out OpenMP. Using this, more than one check is carried out at once (your "alg" function) thus if you have a dual/quad core cpu, your program should be faster.
That said, if as suggested above the problem is NP-complete, it'll be faster, not necessarily fast.