Attention Programmers!

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

  1. zimbo
    Honorary Member

    zimbo Petabyte Poster

    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

    Throw in binary chop and I'm your man (Oooh - Er missus).

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

    Mathematix Megabyte Poster

    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.