Added efficient algorithm(binary search) to get cards