Sponsored
Use these hints if you're stuck. Try solving on your own first.
Precalculate the frequencies of all nums1[i]^2 and nums2[i]^2
Solve with full IDE support and test cases