This is not a specific .net answer, but the usual approach to this problem is to create an index and pre-compute autocomplete lists that are stored in the hierarchical map map card ...- of-maps-of-lists (see below). This is basically an implementation of trie .
, - (REAL hash map, O (1)), . "XYZ" , , "XYZ"; "XYZA", "XYZB",... .. , N (N ), , N- .
M N ( , , >= M , ) .
:
TopMap => {
'A' => Map_for_A
'B' => Map_for_B
...
}
Map_For_A => {
'AA' => Map_for_AA
'AB' => Map_for_AB
...
}
Map_For_AB => {
'ABC' => Map_for_ABC
'ABD' => Map_for_ABD
...
}
Map_For_ABD => {
'ABDE' => List_For_ABDE
'ABDX' => List_For_ABDX
}