...let John help you code



How to find an O(n) solution and Implement the O(n) solution

Asked by:
iyer
Aug 09, 2016, 22:06

Description

Given a set of numbers -50 to 50, find all pairs that add up to a certain sum that is passed in. What's the O notation for what you just wrote? Can you make it faster? Can you find an O(n) solution? Implement the O(n) solution

0 Answer

Answer :
Code

Preview