Karthik's submission of Beautiful Array | CodeChef