How to design an algorithm to calculate countdown style maths number puzzle
I have always wanted to do this but every time I start thinking about the problem it blows my mind because of its exponential nature. The problem solver I want to be able to understand and code is for the countdown maths problem: Given set of number X1 to X5 calculate how they can be combined using mathematical operations to make Y. You can apply multiplication, division, addition and subtraction. So how does 1,3,7,6,8,3 make 348 ? Answer: (((8 * 7) + 3) -1) *6 = 348 . How to write an algorithm that can solve this problem? Where do you begin when trying to solve a problem like this? What