How can you find two indices whose values sum to a target in one pass?
Keep a map from previously seen values to their indices. For each element, check whether its complement, target minus current value, has already appeared. Check before inserting so the same element ca...