Problem of the Week
Problem 1: FizzBuzz
Write a program that prints numbers from 1 to 100. But for multiples of 3, print "Fizz" instead of the number, and for multiples of 5, print "Buzz." For numbers that are multiples of both 3 and 5, print "FizzBuzz."
Problem 2: Reverse a String
Write a function that takes a string as input and returns the string reversed. For example:
Input: "hello"
Output: "olleh"
Problem 3: Find the Maximum Number in an Array
Given an array of integers, write a function that returns the largest number in the array. For example:
Input: [2, 4, 9, 3, 7]
Output: 9
Problem 4: Palindrome Check
Write a function that checks whether a given word is a palindrome (a word that reads the same forwards and backwards). For example:
Input: "racecar"
Output: True
Problem 5: Sum of an Array
Write a function that takes an array of integers and returns the sum of all the numbers. For example:
Input: [1, 2, 3, 4, 5]
Output: 15