Cognizant Interview Question

Write merge sort logic and write prime number program.