We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fdc494 commit b3c4847Copy full SHA for b3c4847
solution/0400-0499/0412.Fizz Buzz/Solution.go
@@ -1,4 +1,4 @@
1
-func fizzBuzz(n int) (ans []string) {
+func fizzBuzz(n int) []string {
2
ans := make([]string, 0, n)
3
for i := 1; i < n+1; i++ {
4
switch {
@@ -13,4 +13,4 @@ func fizzBuzz(n int) (ans []string) {
13
}
14
15
return ans
16
-}
+}
0 commit comments