1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Attention Programmers!

Discussion in 'Scripting & Programming' started by zimbo, Mar 8, 2007.

  1. zimbo
    Honorary Member

    zimbo Petabyte Poster

    5,215
    98
    181
    I kinda need some help on a theory question.. got to do with java sorting and i hope someone could maybe help me understand the different between linear searching and bucket searching. I understand how both work just not sure when to use the one and when to use the other or does one perform the task better?

    ideas? :biggrin

    Thanks! 8)
     
    Certifications: B.Sc, MCDST & MCSA
    WIP: M.Sc - Computer Forensics
  2. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,623
    115
    224
    Throw in binary chop and I'm your man (Oooh - Er missus).

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  3. Mathematix

    Mathematix Megabyte Poster

    969
    35
    74
    Well, searching is all about finding the required element with the minimal effort. When selecting a search algorithm you need to ask yourself several questions:

    1. Is the data sorted?
    2. What is the size of the sample to be searched?
    3. What is the probability of the element being found?
    3. Depending on the above, which algorithm has the least complexity (O(m), where 0 < m <= N where N is the least efficient algorithm).

    As you are aware every algorithm has its cost, so choose carefully. :)
     
    Certifications: BSc(Hons) Comp Sci, BCS Award of Merit
    WIP: Not doing certs. Computer geek.

Share This Page

Loading...