sir tell me one thing that what is the need of this while we can search via linear search it’s not reducing time complexity
and for a different data type, we can use a different data type array and it’s so complex in written how it is more beneficial instead of liner search
Difference between the use of comprator and linear search for searching of any data type value
sry not comprator i was saying about iterators
hello @goo-mico.100,
here we have implemented generic search function which will work for all datatype so we do not need to create separate function for different dataype (i.e the search function is type independent now).
this is one of the benefit of applying generic programming.
however time complexity is still thr same.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.