Book Search Algorithm

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Given 1 million books and titles

How do you fastly search for the titles as well as keywords from the contents of
each book

1.) title search


Linear approach: o(n)

Given 1 million book titles,


Iterate through each title
Match for a keyword found
If found, then put in a found array

Binary search approach: o(log n)

2) keyword in a book search

Sources:
https://www.geeksforgeeks.org/bfs-vs-dfs-binary-tree/
https://www.researchgate.net/publication/322765507_Efficient_Algorithm_for_Two_Dime
nsional_Pattern_Matching_Problem_Square_Pattern
https://introcs.cs.princeton.edu/java/42sort/
http://www-igm.univ-mlv.fr/~mac/REC/text-algorithms.pdf
http://www-igm.univ-mlv.fr/~mac/REC/B1.html
https://en.wikibooks.org/wiki/A-
level_Computing/AQA/Paper_1/Fundamentals_of_algorithms
https://en.wikipedia.org/wiki/String-searching_algorithm
https://www.hackerearth.com/practice/algorithms/dynamic-programming/2-
dimensional/tutorial/

Production Tools:
http://jayant7k.blogspot.com/2006/05/mysql-fulltext-search-versus-lucene.html
http://lucene.apache.org/solr/
http://lucene.apache.org/index.html
https://redis.io/

You might also like