Patch Infotech interview question

Prime number and Array sorting