Company: Juspay_7july
Difficulty: medium
Weight Lifting Challenge Problem Description Sarah is training for a weightlifting competition. She has a set of n different weights, and each weight has a specified initial load. To optimize her training, she decides to add an additional load to each weight based on a permutation of the numbers from 1 to n. Sarah can select exactly one permutation of length n, p1, p2, ..., pn, and then change each weight's load according to the rule: w[i] = w[i] + p[i]. After applying this additional load, Sarah wants to find out the maximum number of weights that can have the same final load. Help Sarah by finding the maximum possible number of weights that can have an identical load after the addition. Here 1 Each p[i] is unique. Complete the solve function in the editor below. It has the following parameter(s): Name: n , Type: INTEGER , Description: the number of weights Name: w , Type: INTEGER ARRAY , Description: contains n integers w1, w2, ... wn (1 The function must return an INTEGER denoting t