Company: Virtusa..._11oct
Difficulty: medium
Divisible Group Identifier Problem Description You are given an integer array A of length N. The array needs to be divided into exactly 4 consecutive groups using the following rules: The first N % 4 groups will have size (N / 4) + 1. The remaining groups will have size (N / 4). Compute the sum of the elements for each group. Identify the most frequent element in the group: If there's a tie, pick the smallest value. If all elements are unique, pick the smallest element. A group is called a valid group if the group sum is divisible by the most frequent element. Your task is to find and return a string value representing the space-separated list of 1-based indices of all valid groups. If no group satisfies the condition, return -1. Input Specification: input1: An integer value N, representing the number of elements in the array. input2: An integer array A. Output Specification: Return a string value representing the space-separated list of 1-based indices of all valid groups. If no group