C++ Solution : Fizz Buzz || Using Math || Beats 100%
Using Math\n* Time Complexity - O(N)\n\nclass Solution {\npublic:\n    vector<string> fizzBuzz(int n) {\n        vector<string> ans;\n        \n        for(int 
**Using Math**\n* Time Complexity - O(N)\n```\nclass Solution {\npublic:\n    vector<string> fizzBuzz(int n) {\n        vector<string> ans;\n        \n        for(int i = 1; i <= n; i++){\n            bool divisible3 = i % 3; \n            bool divisible5 = i % 5;\n            \n            //if divisible by both 3 & 5\n            if( !divisible3 && !divisible5){\n                ans.push_back("FizzBuzz");\n            }\n            //if divisible by 3\n            else if( !divisible3 ){\n                ans.push_back("Fizz");\n            }\n            //if divisible by 5 \n            else if( !divisible5 ){\n                ans.push_back("Buzz");\n            }\n            else{\n                ans.push_back(to_string(i));\n            }\n        }\n        return ans;\n    }\n};\n```\n\nPlease Upvote if it helps :)
['Math', 'C++']