Skip to main content

Timeline for Strings without twin letters

Current License: CC BY-SA 4.0

10 events
when toggle format what by license comment
Feb 20 at 14:33 history edited Arnold Palmer CC BY-SA 4.0
added 31 characters in body
Feb 20 at 14:18 comment added Mukundan314 64 bytes: f=lambda l,n:l*(n<2)or[b+a for a in f(l,n-1)for b in{*l}-{a[0]}] (bug fixed)
Feb 20 at 14:12 history edited Arnold Palmer CC BY-SA 4.0
Added the 'A', 2 test case so that others can try their golfs with that case, since that seems to be the main edge case
Feb 20 at 14:06 history edited Arnold Palmer CC BY-SA 4.0
Added the 'A', 2 test case so that others can try their golfs with that case, since that seems to be the main edge case
Feb 20 at 14:05 comment added Albert.Lang f=lambda l,n:[""][n:]or[c+w for w in f(l,n-1)for c in{*l}-{*w[:1]}] seems to work.
Feb 20 at 14:00 comment added Arnold Palmer @Mukundan314 It looks like both of those fail the 'A', 2 test case, since they both return 'A' instead of an empty list/nothing.
Feb 20 at 11:44 comment added tsh @kg583 won't work for testcase A, 2
Feb 20 at 4:46 comment added Mukundan314 65 bytes: f=lambda l,n:n-1and[b+a for a in f(l,n-1)for b in{*l}-{a[0]}]or l
Feb 20 at 0:57 comment added kg583 [...]if n else[''] can be n and[...]or['']
Feb 19 at 17:03 history answered Arnold Palmer CC BY-SA 4.0