Pergunta de entrevista da empresa McKinsey & Company

Some specific coding question in java.