Pattern Recognition
#10easy

Pair of Songs with Target Rating

Given a sorted array of movie ratings and a target value, find two movies whose ratings sum exactly to the target. Return their indices. The array is sorted in non-decreasing order and you may assume exactly one solution exists.

Which pattern would you use?

Foundations

Intermediate

Advanced