How thread can be used to improve time complexity of a code?

341 views Asked by At

As per my knowledge thread can only reduce execution time,and it can not reduce time complexity.

correct me if i am wrong.

Suppose we have a doubly linklist,can we use thread to improve time complexity of search a element from a random node ? with simple search we traverse next to random node till end of list,and pre of random node till first node,can we improve this using thread,can we do it in less than O(n) time using thread.

1

There are 1 answers

0
Jashaszun On

No. For example, using another thread will make it twice as fast (if perfectly implemented), but 1/2 of O(n) is still O(n).