An intern I don't expect to contribute anything of value by definition, but if even a junior human programmer gave me anything involving O(n) memory to solve either of these problems they'd be getting some serious performance review notes.
If this is the future of programming I hope you love systems that suck.