1. using Trie with each node attached a list of suggestions.
http://rmandvikar.blogspot.hk/2008/10/trie-examples.html
2. using Ternary Search Tree
more space efficient.
http://www.geeksforgeeks.org/ternary-search-tree/
http://igoro.com/archive/efficient-auto-complete-with-a-ternary-search-tree/