← All problemsSign in

1865. Finding Pairs With a Certain Sum

LeetCodeArrayHash TableDesignOpen on judge ↗

You are given two integer arrays nums1 and nums2. You are tasked to implement a data structure that supports queries of two types: - Add a positive integer to an element of a given index in the array nums2. - Count the number of pairs (i, j) such that nums1[i] + nums2[j] equals a given value (0 <= i < nums1.length and 0 <= j < nums2.length). Implement the FindSumPairs class: - FindSumPairs(int

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start