Thread: Running times

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    10

    Question Running times

    Does anyone know what are the relative search speed for binary search, hash tables and array for a dictionary (sorted/undorted)?

    Any suggestions would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    7

    Post

    look for it in data structure books. most books have these math expressions.
    binary search is something like 2ln(n) (for worst case or Big-O) not sure though.

    look for the books. or search the web.

  3. #3
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    >Does anyone know what are the relative search speed for binary search
    O(logN) // Logarithmic

    >hash tables
    O(1) // Constant

    >and array for a dictionary
    O(N) // Linear for unsorted
    O(logN) // Logarithmic for sorted because you should be using binary search
    p.s. What the alphabet would look like without q and r.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Times function for rational numbers
    By CaliJoe in forum C++ Programming
    Replies: 1
    Last Post: 05-01-2009, 04:09 PM
  2. Replies: 10
    Last Post: 04-26-2009, 02:46 PM
  3. Monitor a running instance of MS Word
    By BobS0327 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2008, 12:40 PM
  4. how can I re-sort a map
    By indigo0086 in forum C++ Programming
    Replies: 8
    Last Post: 06-01-2006, 06:21 AM
  5. Fastest STL container?
    By Shakti in forum C++ Programming
    Replies: 18
    Last Post: 02-17-2006, 02:07 AM