C++ Binary Search Solution
\nclass Solution {\npublic:\n    vector<int> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        int totalNumberBurgers = cheeseSlices;\n        \n     
```\nclass Solution {\npublic:\n    vector<int> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        int totalNumberBurgers = cheeseSlices;\n        \n        // Low & high represent boundaries of binary search for number of jumbo burgers\n        int low = 0; int high = totalNumberBurgers;\n        while (low <= high) {\n            int mid = low + (high - low) / 2;\n            \n            int currSlices = mid*4 + (totalNumberBurgers - mid)*2;\n            if (currSlices == tomatoSlices) {\n                return {mid, totalNumberBurgers-mid};\n            }\n            \n            if (currSlices < tomatoSlices) {\n                low = mid+1;\n            } else {\n                high = mid-1;\n            }\n        }\n        \n        return {};\n    }\n};\n```
[]