Pergunta de entrevista da empresa Bridgewater Associates

Given a set of data, how would you write an algorithm to accomplish a specific goal (sorting, finding outliers, etc)