moment

Does the isNice�� not ends on�� result nice.

What do you then use as smalltalk version.

Roelof


Op 15-12-2018 om 21:36 schreef Nicole de Graaf:
Hi Roelof,

the result of:
FindNiceStrings new isNice: testData �� >> ��#('haegwjzuvuyypxyu���).

First idee is your algo is fine, but you test assert correct implemented (I can be wrong side I use not Pharo 7 or 6)��

My implementation:

testisNice
"comment stating purpose of message"

| testData |
testData := #('ugknbfddgicrmopn' 'aaa' 'jchzalrnumimnmhp' 'haegwjzuvuyypxyu').
self assert: (FindNiceStrings new isNice: testData) equals: #('haegwjzuvuyypxyu���)

is working fine.

Please can you check it on your side!

Regards,
Nic

On 15 Dec 2018, at 21:20, Roelof Wobben <r.wobben@home.nl> wrote:

You can find that one also with the finder.


overlappingPairsCollect: aBlock
������ "Answer the result of evaluating aBlock with all of the overlapping pairs of my elements."
������ | retval |
������ retval := self species ofSize: self size - 1.
������ 1 to: self size - 1
������ ������ do: [:i | retval at: i put: (aBlock value: (self at: i) value: (self at: i + 1)) ].
������ ^retval

can be found at sequenceCollection.

Roelof


Op 15-12-2018 om 21:03 schreef Nicole de Graaf:
p.s. and also Array>>#overlappingPairsCollect: ��

Regards,
Nic

On 15 Dec 2018, at 20:52, Nicole de Graaf <nic@soops.nl> wrote:

Hi Roelof,

I started to read you code , can you please give me the implementation of: ByteString>>#includesSubstring:

Regards,
Nic

On 15 Dec 2018, at 19:36, Roelof Wobben <r.wobben@home.nl> wrote:

Hello,

I have this code : https://gist.github.com/RoelofWobben/7c08680797d1d9f84436653a0e4edd3b
as�� my solution to a AoC challenge.


But the last test `testIsNice`�� is still�� outputting the wrong output.
The right output is :���� `ugknbfddgicrmopn ` and `aaa`

Someone who can think with me where I make a thinking error so that the right output is seen.

Regards,

Roelof