Talk:TADM2E 4.6

From Algorithm Wiki
Revision as of 04:31, 9 February 2015 by Brownslink (talk | contribs) (O(n) Solution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

What about this approach?

  • Create a hash entry for every value from S1[i].
  • For each value in S2 look for a hash hit on x-S2[i].

Isn't that an O(n) solution?