What is the optimal asymptotic complexity in which this problem can be solved?

Given a set \(S\) of \(n\) integers and another integer \(x\), check if there exists two elements \(a\) and \(b\) in \(S\) such that \(a + b = x\)

**Bonus**: Prove the optimality of your algorithm.

×

Problem Loading...

Note Loading...

Set Loading...