Pregunta de entrevista de IQVIA

array sorting, finding g.c.d and some basic patterns .