O(1) | Simple Algebra | Linear Equation in 2 variables
\t\tclass Solution {\n\t\tpublic:\n\n\t\t\tvector numOfBurgers(int t, int c) {\n\t\t\t\t// Lets assume a is total number of tomato slices for jumbo burger and b
\t\tclass Solution {\n\t\tpublic:\n\n\t\t\tvector<int> numOfBurgers(int t, int c) {\n\t\t\t\t// Lets assume a is total number of tomato slices for jumbo burger and b is total number of tomato slices for small burger\n\t\t\t\t// Now if provided data will give answer it must satisfy these two given equation \n\t\t\t   // Equation 1\n\t\t\t\t// a/4 + b/2 = c    i.e. total tomato slices for jumbo burger / 4 + total slices for small burger / 2 should be equal to total cheese slices\n\t\t\t\t// Equation 2\n\t\t\t\t// a+b = t       also total tomato slices for jumbo burger + total slices for small burger  should be equal to total cheese tomato slice\n\t\t\t\t// here t is total tomato slice and c is total cheese slice \n\t\t\t\tint b = 4*c-t;\n\t\t\t\tint a = t-b;\n\t\t\t\tif( a<0 || b<0 || b%2!=0 || a%4 !=0) return {};\n\t\t\t\tb/=2;\n\t\t\t\ta/=4;\n\t\t\t\treturn {a,b};\n\n\n\n\t\t\t}\n\t\t};
['Math', 'C++']