well commented easy to understand solution
\nclass Solution {\npublic:\n    \n    bool isPossible(vector<float>& cards) {\n        int n = cards.size();\n        // If we are left with only 1 cards then 
```\nclass Solution {\npublic:\n    \n    bool isPossible(vector<float>& cards) {\n        int n = cards.size();\n        // If we are left with only 1 cards then it should be 24 else return false\n        if (n == 1) {\n            // max number can be 9*9*9*9 i.e 10 power 4 around, so we can float till 4 digits\n            return ((cards[0] > 23.9999) && (cards[0] < 24.0001 ));\n        }\n       \n        // Try for all possible permutation of the card\n        for (int i = 0; i < n; i++) {\n            for (int j = i+1; j < n; j++) {\n                vector<float> newExpr;\n                // push all the combination between 2 cards\n                newExpr.push_back(cards[i]+cards[j]); // addition\n                newExpr.push_back(abs(cards[i]-cards[j])); // substraction\n                newExpr.push_back(cards[i]*cards[j]); // multiplication\n                \n                // division a/b\n                if (cards[j] > 0)\n                    newExpr.push_back(cards[i]/cards[j]);\n                \n                // division b/a\n                if (cards[i] > 0)\n                    newExpr.push_back(cards[j]/cards[i]);\n                \n                // Create a new card deck except 2 picked above for operation\n                vector<float> newCards;\n                for (int k = 0; k < n; k++) {\n                    if ((k != i) && (k != j)) \n                        newCards.push_back(cards[k]);\n                }\n                \n                // Assume new card is the one with new possible sum calucuated \n                // recurse with remaining cards with one card of possible sum\n                for (auto e : newExpr) {\n                    newCards.push_back(e);\n                    if (isPossible(newCards))\n                        return true;\n                    newCards.pop_back();\n                }\n            }\n        }\n        return false;\n    }\n    bool judgePoint24(vector<int>& cards) {\n        vector<float> newCards(cards.begin(), cards.end());\n        return isPossible(newCards);\n    }\n};\n```
[]