4 ms·
Their immediate follow up will be “can you improve this solution?” In either complexity or runtime or memory usage etc. but even if you can’t having a solution
by gigatexal 2y ago
Their immediate follow up will be “can you improve this solution?” In either complexity or runtime or memory usage etc. but even if you can’t having a solution that works is better than not completing it at all.
A good interviewer is trying to get you to do these to see how you think. Not if you’ve memorized all the solutions.
So I meant very much to give you props for being able to solve them so they work but also to say think how you might fix them to run more efficiently as that’s what they will ask next.