@@ -0,0 +1,1062 @@
+package FizzBuzz;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * Write a program that outputs the string representation of numbers from 1 to n.%0A *%0A * But for multiples of three it should output %E2%80%9CFizz%E2%80%9D instead of the number and for the multiples of%0A * five output %E2%80%9CBuzz%E2%80%9D. For numbers which are multiples of both three and five output %E2%80%9CFizzBuzz%E2%80%9D.%0A *%0A * Example:%0A * %3Cpre%3E%0A * n = 15,%0A *%0A * Return:%0A * %5B%0A * %221%22,%0A * %222%22,%0A * %22Fizz%22,%0A * %224%22,%0A * %22Buzz%22,%0A * %22Fizz%22,%0A * %227%22,%0A * %228%22,%0A * %22Fizz%22,%0A * %22Buzz%22,%0A * %2211%22,%0A * %22Fizz%22,%0A * %2213%22,%0A * %2214%22,%0A * %22FizzBuzz%22%0A * %5D%0A * %3C/pre%3E%0A */%0Apublic class Solution %7B%0A    public List%3CString%3E fizzBuzz(int n) %7B%0A        List%3CString%3E fizz = new ArrayList%3C%3E(n);%0A        for (int i = 1; i %3C= n; i++) %7B%0A            if (i %25 3 == 0 && i %25 5 == 0) %7B%0A                fizz.add(%22FizzBuzz%22);%0A            %7D else if (i %25 3 == 0) %7B%0A                fizz.add(%22Fizz%22);%0A            %7D else if (i %25 5 == 0) %7B%0A                fizz.add(%22Buzz%22);%0A            %7D else %7B%0A                fizz.add(%22%22 + i);%0A            %7D%0A        %7D%0A        return fizz;%0A    %7D%0A%7D

412. Fizz Buzz