you give integer array nums1 nums2 you task implement data structure support query typesAdd positive integer element give index array nums2Count number pair j nums1i nums2j equal give value 0 nums1length 0 j nums2lengthimplement FindSumPairs classfindsumpairsint nums1 int nums2 Initializes FindSumPairs object integer array nums1 nums2void addint index int val add val nums2index ie apply nums2index valint countint tot return number pair j nums1i nums2j tot Example 1inputfindsumpairs count add count count add add count1 1 2 2 2 3 1 4 5 2 5 4 7 3 2 8 4 0 1 1 1 7outputnull 8 null 2 1 null null 11ExplanationFindSumPairs findSumPairs new FindSumPairs1 1 2 2 2 3 1 4 5 2 5 4findsumpairscount7 return 8 pair 22 32 42 24 34 44 2 5 pair 51 55 3 4findsumpairsadd3 2 nums2 145454findsumpairscount8 return 2 pair 52 54 3 5findsumpairscount4 return 1 pair 50 make 3 1findsumpairsadd0 1 nums2 245454findsumpairsadd1 1 nums2 255454findsumpairscount7 return 11 pair 21 22 24 31 32 34 41 42 44 2 5 pair 53 55 3 4 Constraints1 nums1length 10001 nums2length 1051 nums1i 1091 nums2i 1050 index nums2length1 val 1051 tot 109At 1000 call add count