Two Difference | The Walking Dad
Two Difference
Problem Definition
Given an sorted array and find two numbers in the array having difference equal to given number.
Your function should return indices of the two numbers.
If there are multiple pairs, just return any of them. Return [-1,-1] if no result can be found.
You may assume that the input array has no duplicates.
Read full article from Two Difference | The Walking Dad
No comments:
Post a Comment