X is an integer stream of N numbers. You have to select 2 data P and Q such that A<= (P+Q) <=B. Write an algorithm / pseudo code/ C program how many…

X is an integer stream of N numbers. You have to select 2 data P and Q such that A<= (P+Q) <=B. Write an algorithm / pseudo code/ C program how many ways you can select P & Q. The time complexity must be n log n.

From the Combined Bank Assistant Programmer (CSE) 2020 – Preliminary (DU) exam, question 44 of 47.

More from this paper