filmov
tv
LeetCode 412: Fizz Buzz [C++, Python]

Показать описание
Explained solution of LeetCode 412: FizzBuzz: "Given an integer n, return a string array answer (1-indexed) where:
answer[i] == "FizzBuzz" if i is divisible by 3 and 5.
answer[i] == "Fizz" if i is divisible by 3.
answer[i] == "Buzz" if i is divisible by 5.
answer[i] == i (as a string) if none of the above conditions are true."
Code from today's lesson:
Numeral Systems Theory:
LeetCode 412: Fizz Buzz:
Lesson Content:
0:00 Task Description
1:59 Primitive Solution
3:45 C++ Code
5:19 Python Code
answer[i] == "FizzBuzz" if i is divisible by 3 and 5.
answer[i] == "Fizz" if i is divisible by 3.
answer[i] == "Buzz" if i is divisible by 5.
answer[i] == i (as a string) if none of the above conditions are true."
Code from today's lesson:
Numeral Systems Theory:
LeetCode 412: Fizz Buzz:
Lesson Content:
0:00 Task Description
1:59 Primitive Solution
3:45 C++ Code
5:19 Python Code