A simple linear C# solution.
A simple linear C# solution. Feel free to suggest improvements.\n\nTime Complexity: O(n)\nSpace Complexity: O(n)\n\nRuntime: 248 ms, faster than 98.92% of C# on
A simple linear C# solution. Feel free to suggest improvements.\n\n**Time Complexity:** O(n)\n**Space Complexity:** O(n)\n\nRuntime: 248 ms, faster than 98.92% of C# online submissions for Fizz Buzz.\nMemory Usage: 31.3 MB, less than 100.00% of C# online submissions for Fizz Buzz.\n\n```\n    public IList<string> FizzBuzz(int n) {\n        List<string> result = new List<string>(n);\n        for(int i=1,fizz=0,buzz=0; i<=n; i++){\n            fizz++;\n            buzz++;\n            if(fizz == 3 && buzz == 5){\n                result.Add("FizzBuzz");\n                fizz = 0;\n                buzz = 0;\n            }else if(fizz == 3){\n                result.Add("Fizz");\n                fizz = 0;\n            }else if(buzz == 5){\n                result.Add("Buzz");\n                buzz = 0;\n            }else{\n                result.Add(i.ToString());\n            }\n        } \n        return result;\n    }
[]