Sunday, July 18, 2010

Find first duplicate in O(k) for an array of N integers with k keys

In O(k) time and O(k) space is trivial, how about O(k) time and O(1) space?

1 comment: