Chatting with a friend about a game we used to play, and thinking how to implement it in code.
Here isare the rules: Given
Given a list of number e.g. {1,2,3,4}
tryTry to use all the numbernumbers from the list to perform +,-,*,/ operationoperations to reach a target number e(e.g. 2).
The numbers can be used only once, the operators can be used more than once.
So one solution willwould be (1+3)*2/4 = 2
any ideaAny ideas for an algorithm to get at the answer(s)?