Company: Infosec_intern_flipkart(cybersec)
Difficulty: medium
FizzBuzz Array Transformation You are given an integer array arr . Turn every element into a word, keeping the original order of the array, using these rules: If the element is divisible by both 3 and 5 , its word is fizzbuzz . Otherwise, if it is divisible by 3 , its word is fizz . Otherwise, if it is divisible by 5 , its word is buzz . Otherwise its word is not fizzbuzz (two words separated by a single space). Implement getResult(arr) , which returns all the words joined by newline characters, one word per element, in the same order as the elements of arr . There is no newline after the last word. Input Format The first line contains a single integer n - the number of elements. The second line contains n space-separated integers arr[0], arr[1], ..., arr[n - 1] . Output Format Print n lines. Line i holds the word for arr[i - 1] . Constraints 1 <= n <= 1000 (inferred -- the source gives no bounds; 1000 keeps the longest output, 1000 lines of not fizzbuzz , under the judge's outpu