Page 1 of 1

Let’s suppose at dataset x contains n elements. Compare the running time of T1 of the linear search algorithm with the r

Posted: Sat Nov 27, 2021 10:27 am
by answerhappygod
Let’s suppose at dataset x contains n elements. Compare the
running time of T1 of the linear search algorithm with the running
time T2 of binary search algorithm when  N= 1000 and  N= 10000
While the complexity of linear search is C(n)= n/2 and the
complexity of binary search is C(n)= log2n
The programming solution should be in C++ language and also an
explaination