Monday, January 5, 2015

Which data structure is used by samsung swype keypad?


Generally all the dictionary based data models are driven by Trie as the base data structure. The actual code of dictionaries may use a better optimised version of the same.
An example explaining Trie:
Consider you have a initial data set likewise - bat, battle, batter, blow, blog
The resulting Trie would be - 
See that if you swipe over the character B then all these words are candidate for the suspected word then depending on the swipe direction you go on eliminating the wrong ones finally arriving at the correct word.

No comments:

Post a Comment