That’s a very strange piece.

Second after you pop this algorithm you’ll be asked “what’s the complexity of your solution”, and second after that “can you do better than that?”. And that’s where the hard part starts, not before that.

Not to mention that you have about 20 minutes to solve that problem in the most optimal way.

Solutions Architect @Depop, author of “Hands-on Design Patterns with Kotlin” book and “Web Development with Kotlin” course

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store