Go. Backtracking
\nvar epsilon = math.Pow10(-6)\n\nfunc judgePoint24(cards []int) bool {\n\n\tgenerateAllPossibleResults := func(a, b float64) []float64 {\n\t\tres := [] float64
```\nvar epsilon = math.Pow10(-6)\n\nfunc judgePoint24(cards []int) bool {\n\n\tgenerateAllPossibleResults := func(a, b float64) []float64 {\n\t\tres := [] float64 {a+b, a*b, a-b, b-a}\n\t    if b != 0 {res = append(res, a/b) }\n\t    if a != 0 {res = append(res, b/a) }\n\t\treturn res\n\t}\n\n\tisValid := func(a []float64) bool {\n\t\treturn math.Abs(a[0] - 24) <= epsilon\n\t}\n\n\tcardsWithoutIndexes := func(a []float64, index1, index2 int) []float64 {\n\t\tr := []float64{}\n\t\tfor i, v := range a {\n\t\t\tif i != index1 && i != index2 {\n\t\t\t\tr = append(r, v)\n\t\t\t}\n\t\t}\n\t\treturn r\n\t}\n\n\tvar backtrack func(a []float64) bool \n\n\tbacktrack = func(a []float64) bool {\n\t\tif len(a) == 1 { return isValid(a) }\n\t\tfor i:=0; i<len(a);i++ {\n\t\t\tfor j:=i+1; j<len(a); j++ {\n\t\t\t\tpossibleResults := generateAllPossibleResults(a[i], a[j])\n\t\t\t\tfor _,v  := range possibleResults {\n\t\t\t\t\tnewA := cardsWithoutIndexes(a, i, j)\n\t\t\t\t\tnewA = append(newA, v)\n\t\t\t\t\tif backtrack(newA) { return true }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false\n\t}\n\t\n\tfCards := []float64{}\n\tfor _,v := range cards {\n\t\tfCards = append(fCards, float64(v))\t\n\t}\n\treturn backtrack(fCards)\n}\n```
['Backtracking', 'Go']