Another method that can often be used to find Big O is to
look at the * ratio* of times as the size of input is
doubled. Ratios that are approximately powers of 2 are
easily recognized:

Ratio | Big O |

2 | n |

2+ | n * log(n) ? |

4 | n ^{2} |

8 | n ^{3} |

** Example:**

n | Time | Ratio |

4000 | 0.01779 | |

8000 | 0.06901 | 3.8785 |

16000 | 0.27598 | 3.9991 |

32000 | 1.10892 | 4.0180 |

64000 | 4.44222 | 4.0059 |

Since the ratio is about 4, this function is *O(n ^{2})*.