You are given a sorted array of integers (in ascending order) and a target integer. Your task is to find two distinct numbers in the array that add up to the target integer using the two-pointer technique. If a valid pair is found, return their indices (0-based); if no such pair exists, return an empty list.
Input: nums = [1, 2, 3, 4, 6], target = 6
Output: [1, 3] // because nums[1] + nums[3] = 2 + 4 = 6
On December 10, 2024, as the festive season approaches, enjoy solving this challenge and celebrate your coding progress!