Company: Infosec_intern_flipkart(cybersec)
Difficulty: medium
FizzBuzz Array Transformation Problem Description You are given an integer array arr . You need to construct a result string based on the values in the array according to the following rules: For each integer in the array, iterate through them in order and check these conditions: If the number is divisible by both 3 and 5 , append "fizzbuzz" to the result. If the number is divisible by 3 (but not 5), append "fizz" to the result. If the number is divisible by 5 (but not 3), append "buzz" to the result. If the number is not divisible by either 3 or 5, append "not fizzbuzz" to the result. The result strings for each element should be separated by a newline character ( "\n" ), except for the last element which should not have a trailing newline. Return the final constructed string. Examples Example 1: Input: arr = [3, 5, 15, 2] Output: "fizz\nbuzz\nfizzbuzz\nnot fizzbuzz" Explanation: - 3 is divisible by 3: "fizz" - 5 is divisible by 5: "buzz" - 15 is divisible by 3 and 5: "fizzbuzz" - 2 i