Tech Mahindra Interview Question

Write linear search