Pergunta de entrevista da empresa Commvault

Variation of LCS, Solution was straight forward after identifying this.