LeetCode 1 -TwoSum_Solution (Coding With C#)

題目:

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

題目大意:

給予一串數值陣列,以及一個目標值。得到兩個陣列索引位子,而該索引位子的數值相加會等於目標值。

並且給予的數值陣列只可查訪一次,不可多次查訪。

...繼續閱讀 »