4 ms·
Note: "Say you have one string of alphabetic characters" The array of bools, bitmap (remember 32-bit int!), hash map; all are the same basic deal, easy to unde
by blinks 16y ago
Note: "Say you have one string of alphabetic characters"
The array of bools, bitmap (remember 32-bit int!), hash map; all are the same basic deal, easy to understand code, etc. Any would probably be fine, imho.
Hash map would be my initial implementation, though, if only because I don't know where it would be used, and the map will be immediately understood.
- barrkel 16y agoI come from a compiler background. When I hear "alphabet" I don't think a-z - I think of an arbitrary set of distinct symbols that can be arranged into a string.
- TheNewAndy 16y agoYes, but even in compiler land, you don't say "alphabetic" to mean a symbol taken from your particular alphabet (since that is practically a given... a symbol outside the alphabet might as well not exist).