Pregunta de entrevista de Amazon

A coding question based on data structure.

Respuesta de la entrevista

Anónimo

7 mar 2022

I first discussed the possible solutions that I had in mind and coded the one I finally concluded at. Then the interviewer asked for a further optimised solution and I was not able to come up with it.