Discuss Big-O complexity for your proposed solution and identify potential bottlenecks in memory usage.