iamantony / CppNotes

My notes about C++
MIT License
1 stars 3 forks source link

Tasl: find two elements whose sum equals to some value #22

Closed iamantony closed 8 years ago

iamantony commented 8 years ago

Input:

Output: two array indexes, that point to numbers whose sum equals to value.

We can sort array. If we failed to find such indexes, return negative indexes.

iamantony commented 8 years ago

Done: 14093dd85bd5ea2503523b72a5493f0dc2a944b7