Question d’entretien chez Bloomberg

2 leetcode medium problems and come up with their analyses.