Pergunta de entrevista da empresa Parsons Corporation

How would you sort an array of integers? How would you write your own sort method? Difference between TCP and UDP? How is a packet loss usually handled?