Pregunta de entrevista de Works Applications

Array sorting and pattern printing problems.