Pregunta de entrevista de IBM

Two coding question base on Data Structures and Algorithms