【LeetCode】1. Two Sum(Java)

题目描述:给定一个整数数组,返回两个数字的索引,使它们相加成为一个特定的目标。 您可能假设每一个输入只有一个解决方案,而且您可能不会两次使用相同的元素。java Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1].web import java.
相关文章
相关标签/搜索