Computer Science, asked by matiullahgeolog5944, 1 year ago

Use the algorithm to search 32 in the following list of elements.

Answers

Answered by Shenron
0

Assuming the the data is not sorted, if the elements are in an array start will first element and compare with each element until either you find the element or reach till the end

If elements are in linked list you can start will the first element, compare and then move to the next node using the next pointer, do this until you either find the element of the next pointer of a node is pointing to NULL.

If the data is sorted and is in array then you can apply binary search

Similar questions