[fpc-devel] Re: enumerators
Marco van de Voort
marcov at stack.nl
Sun Nov 14 16:02:38 CET 2010
In our previous episode, Thaddy said:
> > would be evaluated every time. S
> > the O(N^2) stems from the fact that it is hard to get the ith
> > character in a a UTF8String in O(1). Suppose it is o(N), then the loop
> > is O(n^2).
> "Hard to" is implementation detail and not part of any algorithm. A
> translation table goes a long way in implementing your example efficiently.
What kind of translation table ? Do you have an example? What is the key and
what is the value?
More information about the fpc-devel