Pregunta de entrevista de Rakuten

Deduplication of table Basic solution and efficient one