Pregunta de entrevista de CoinTracker

How to optimize a piece of code after I had solved the coding challenge.