Pregunta de entrevista de Barclays

coding was 4 questions, leetcode mediums