Given an array of integers in ascending order, return index of the two numbers such that they add up to a specific key provided.
Solution Description: This problem can be solved in 2 different ways. Solution 1: Brute Force Technique Explanation: In this technique, we…