Parsons Corporation Interview Question

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?