I'm confused whether linear search or binary search is more efficient in running time and storing.
detalied explaination is really appreciated
@Trophe covered the time complexity, so I'll try to explain the space complexity
The space requirement has the same complexity
a linear search is simpler and needs just one variable
a binary search needs to store a lower and upper bound, so it's more space, but it's not dependent on the size of the list
So we say they are both O(1) space complexity