Nov. 11, 2016
3:13 p.m.
On 11 November 2016 at 12:02, stepharo <stepharo@free.fr> wrote:
String>>#isIsogram
| letters | letters := Dictionary new. self do: [ :x | letters at: x ifAbsent: [] ifPresent: [ ^false ].
Yes I did that one too and I was surprised because it was as slow as the bag implementation.
Anyone tried replacing the dictionary with an array of 26 booleans and indexing based on ascii, or even a SmallInteger and bit shifting?