Given an array of integers and a target value, return the indices of the two numbers in the array that add up to the target value.
A.I. Evaluation of the Solution
The candidate's solution is correct and demonstrates a level of completeness. The candidate's approach is also correct. The candidate's solution has a time complexity of O(n) and a space complexity of O(n).