OA BungeeGames
Anonymous User
221

Hi everyone,recently i gave an OA in which i was not able to solve a question which was like this:-
Given an array of N integers, find the maximum product of a subsequence and note the indexes which u consider for making the subsequence (i,j),their product should be perfect square.Also the array is 1 indexed.

Examples:-
2(Test cases)
N=5
Array={2,4,3,1,5}
Output=5
N=8
Array={8,7,6,5,4,3,2,9}
Output=63

Constraints:-
I don't remeber the constraints for T
1<=N<=2*10^5
1<=A[i]<=10^9
The sum of N over all test cases doesn't exceed 2x10^5.

Comments (2)