Program to find the frequency of each element in an array. Ex: Input: arr [] = {1,1,2,3,3,4} Output: {1 : 2, 2 : 1, 3 : 2, 4 : 1} Given a string and n is the no of rows. Print the string in a zigzag manner. For example, if str = ‘PROGRAMMING’ and n=3 then the output is ‘PRIRGAMNOMG’. [ P R I R G A M N O M G ]