Talk:Two sum: Difference between revisions

Line 21:
 
  -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:17, 23 September 2017 (UTC)
:I updated the task. The assumption that the integers are positive (or non-negative) is absolutely not necessary. Also, that integers are "single" (unique?) does not guarantee a unique solution, so it's useless. For instance, look for the sum 9 in (1,2,7,8). And to see negative integers don't hurt, just add 1-min(a) to the array 'a', and add twice this number to the target. Actually, one could do the same with non-integers, but it would introduce unnecessary difficulties (floating-point is not exact, hence one can't rely on equality comparison). [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 15:15, 4 December 2017 (UTC)
1,336

edits