Cognizant Interview Question

Write codes of Binary Search and Sorting