Professional Documents
Culture Documents
Linear Search:
Advantages Disadvantages
If the lists were small or medium, the The Linear Search would be slower in
linear search would be faster. This is larger lists as there are more values
because there are less values so that still have to be checked so it
there is less numbers to compare would be longer.
against.
The list does not need to be sorted as
the list does not split in half like
Binary Search and it can still find the
value if it isn’t in order.
The Linear Search is not affected if
there was any insertions or deletions
in the list so the list would be still be
continued to find the value
Bubble Sort:
Searching Algorithms
A bubble sort starts at the beginning of an array and checks the first item
against the second item.
Advantages Disadvantages
It is a simple algorithm that can be It can be very slow, sorting all the
implemented on a computer. very large lists of the items.
Efficient ways to check if a list is
already in order.
Doesn’t use too much memory.
Merge Sort:
Searching Algorithms
A merge sort is a more complex sort, but also a highly efficient one.
A merge sort uses a technique called divide and conquer. The list is repeatedly
divided into two until all the elements are separated individually. Pairs of
elements are then compared, placed into order and combined.
Advantages Disadvantages
It is quicker for larger lists; this is Slower comparative to the other sort
because unlike other bubble sorts it algorithms for smaller lists.
doesn’t go through the whole list
several times.
It has a consistent running time, Uses more memory space, to store
carries out different bits with similar the sub elements of the initial split
times in a stage, list.
Binary Search:
Searching Algorithms
A Binary Search is an efficient method of searching n ordered list. It will not
work on a list that has been sorted first.
Advantages Disadvantages
It is a simple algorithm. The list has to be sorted before the
algorithm can be run.
Binary Search is much faster. Even though it a simple code people
get it wrong and it makes it harder.