Say we have an unsorted array and linked list. The worst case when searching for an element for both data …