Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Because in string there are lot of repeated letters while
set(s2)
keep only one of them. So only iterating once per letter.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
shoot, I was testing things out by printing since I'm not too familar with dicts and I forgot to change the print to return. Thanks for pointing that out
You have to
return
the result, notprint
it.This comment is hidden because it contains spoiler information about the solution