Captain George K.
Prof.. Ebrahimi
There are different ways of searching.
1) Linear search (Array --> linked, or File).
2) Linear search with sorted data O(n) little less.
3) Binary search data has to be sorted. log2n
4) Hashing O(c) (the best is when no two indices exist)
- There are different algorithm for searching.
- Give an example dictionary as a way to search.
1) Dictionary is not sorted apply to linear. O(200,000)
Looking for word:
* Computer
* Mug
* Web
- Average dictionary has 200,000 words.
2) Linear Sorted Less
- You need to take 200,000 to find the word.
- The way we would analyze it, it would be called the O(n)
- In Binary search it would take log2n for one megabyte. Takes 20 efforts.
- One Megabyte is 1048576, which is 2 to the power of 20. Will take 20 props.
- In Hashing you will have a unique number. That will help you find the word. There for we could get it right away.
- The is no way of collision.
- The fast way of searching is hashing.
- On page 398.
- There are 398 reserved words.
- Page 402. Ebhash only has one collision.
- Hashing is right away.
- Try to understand ebhash.
- Page 402 ebhash2 line 4 to line 7 (Hash program)
- There are many ways to search.
- Want you to incorporate on your website both java script, and CGI.
- Page 386 Linear Search Through an array.















