Pergunta de entrevista da empresa Amazon

Algorithm to remove a number and divide the rest numbers equally so as it makes their sum same.