FizzBuzz is one of the most frequently asked question on programming interviews and used to filter programmers who can't program. It looks extremely simple but its tricky for those programmer or coder who struggle to structure their code. Fizzbuzz problem statement is very simple, write a program which return "fizz" if number is multiplier of 3, return "buzz" if its multiplier of 5 and return "fizzbuzz" if number is divisible by both 3 and 5. If number is not divisible by either 3 or 5 then it should just return the number itself. You can see nothing is fancy when it comes to think about solution, but when you start coding, you will see problem with structuring your code, particularly if else blocks.
Read more »
No comments:
Post a Comment