Algorithm | | ||
---|---|---|---|

Binary search | | n) | n ) |

Sequential search | | n ) | n ) |

Finding largest | n ) | n ) | n ) |

Pattern matching | n ) | mn ) | n ) |

Selection sort | n^{2}) | n^{2}) | n^{2} ) |

Typically, we look at the **worst case** column to compare the efficiency of algorithms.

Binary search is clearly superior to sequential search and sorting seems more expensive that searching or finding maxima.

CS1104 Main Page

Last Updated 01/05/2000

© L.Heath, 2000