Skip to content

A search auto-complete system for a search engine that returns top N historical hot sentences

Notifications You must be signed in to change notification settings

jchoker/AutoCompleteSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

AutoCompleteSystem

A search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). For each character they type except '#', it returns the top 3 historical hot sentences that have prefix the same as the part of sentence already typed.

These are the specific rules:

1.The hot degree for a sentence is defined as the number of times a user typed the exactly same sentence before.
2.The returned top 3 hot sentences are sorted by hot degree (The first is the hottest one). If several sentences
  have the same degree of hot,      ASCII-code order is used (smaller one appears first).
3.If less than 3 hot sentences exist, then it returns as many as possible.
4.When the input is a special character, it means the sentence ends, and in this case, it returns an empty list.

About

A search auto-complete system for a search engine that returns top N historical hot sentences

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages