Given an Array "arr" of size "n", where arr[i] represents length of stick i. Now you had to choose 6 sticks such that you can create a sqaure out of it.
Output the maximum number of different squares you can create.
Note:- Two ways are considered different if they use at least one different stick.
Input:-
8
4 5 1 5 1 9 4 5Output:-
3Explanation:-
combination 1:- 1, 2, 3, 4, 5, 7
combination 2:- 1, 3, 4, 5, 7, 8
combination 3:- 1, 2, 3, 5, 7, 8Constraints:-
6 <= n <= 3000
1 <= arr[i] <= 1e7