Cognizant Interview Question

difference types of inheritance write binary search