Click here to Skip to main content
15,914,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strikethrough Font with Datagridview Control Pin
Wendelius11-Nov-08 4:08
mentorWendelius11-Nov-08 4:08 
GeneralRe: Strikethrough Font with Datagridview Control Pin
Paul Unsworth11-Nov-08 5:15
Paul Unsworth11-Nov-08 5:15 
GeneralRe: Strikethrough Font with Datagridview Control Pin
Wendelius11-Nov-08 5:36
mentorWendelius11-Nov-08 5:36 
GeneralRe: Strikethrough Font with Datagridview Control Pin
Paul Unsworth12-Nov-08 2:35
Paul Unsworth12-Nov-08 2:35 
GeneralRe: Strikethrough Font with Datagridview Control Pin
Wendelius13-Nov-08 10:36
mentorWendelius13-Nov-08 10:36 
Questionfast search Pin
duta10-Nov-08 3:42
duta10-Nov-08 3:42 
AnswerRe: fast search Pin
Christian Graus10-Nov-08 3:44
protectorChristian Graus10-Nov-08 3:44 
AnswerRe: fast search Pin
Ennis Ray Lynch, Jr.10-Nov-08 4:26
Ennis Ray Lynch, Jr.10-Nov-08 4:26 
AnswerRe: fast search Pin
Wendelius10-Nov-08 6:29
mentorWendelius10-Nov-08 6:29 
AnswerRe: fast search Pin
riced10-Nov-08 7:22
riced10-Nov-08 7:22 
AnswerRe: fast search Pin
Pete O'Hanlon10-Nov-08 11:04
mvePete O'Hanlon10-Nov-08 11:04 
GeneralRe: fast search Pin
jas0n2310-Nov-08 22:23
jas0n2310-Nov-08 22:23 
AnswerRe: fast search Pin
Mark Churchill10-Nov-08 16:01
Mark Churchill10-Nov-08 16:01 
AnswerRe: fast search Pin
N a v a n e e t h10-Nov-08 16:31
N a v a n e e t h10-Nov-08 16:31 
AnswerRe: fast search Pin
Alan Balkany11-Nov-08 4:19
Alan Balkany11-Nov-08 4:19 
A database has a lot of overhead, which you can avoid with your own data structure. I suggest a tree structure where each level takes you one letter farther in the word:

The root will have 26 sons, for the 26 possible first letters. Each of these sons will have up to 26 sons (grandsons of the root) for the (up to) 26 possible second letters, and so on.

1. It saves space because all words sharing a common prefix will use the same path from the root, giving you some compression.

2. It's faster than a database because you don't have to do any time-consuming queries; at each node you have a list of all the possible next characters.

3. When building this tree from your word list, you can increment a counter for each letter added at the current node. This will give you the frequencies for each continuation letter. You can then use these frequencies to predict the most likely continuation.
QuestionReading XML Pin
Planker10-Nov-08 2:56
Planker10-Nov-08 2:56 
AnswerRe: Reading XML Pin
Wendelius10-Nov-08 6:39
mentorWendelius10-Nov-08 6:39 
GeneralRe: Reading XML Pin
Planker10-Nov-08 7:33
Planker10-Nov-08 7:33 
GeneralRe: Reading XML Pin
Wendelius10-Nov-08 7:39
mentorWendelius10-Nov-08 7:39 
GeneralRe: Reading XML Pin
Planker10-Nov-08 8:27
Planker10-Nov-08 8:27 
GeneralRe: Reading XML Pin
Wendelius10-Nov-08 8:41
mentorWendelius10-Nov-08 8:41 
GeneralRe: Reading XML Pin
Planker10-Nov-08 9:06
Planker10-Nov-08 9:06 
GeneralRe: Reading XML Pin
Wendelius10-Nov-08 9:13
mentorWendelius10-Nov-08 9:13 
QuestionLog4Net AsyncAppender Pin
fdbpro10-Nov-08 2:18
fdbpro10-Nov-08 2:18 
AnswerRe: Log4Net AsyncAppender Pin
Simon P Stevens10-Nov-08 2:54
Simon P Stevens10-Nov-08 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.