Count Pairs Having Sum X

easy
1. You are given two linkedlist .
    2. you are also given an integer x.
    3. Return the count of all pairs whose sum is equal to x.

Input Format

Input has been managed for you

Output Format

Output has been managed for you

Constraints

n<=10^4

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
6
1 2 3 4 5 6
3
11 12 13
15
Output
3
Previous
Find the largest rectangle in a matrix
Next
Delete alternate nodes of linked list

Related Questions