Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    \$\begingroup\$ nice use of diff, I was trying to figure out how to get that to work...By the way, you can get rid of the braces around the function body for -2 bytes, but better yet, you can use s=scan() instead of a function definition to save a few more bytes. It'd be great if you'd include a link to Try it online so that other people can verify that this code works for all test cases. \$\endgroup\$ Commented Jun 16, 2017 at 21:03
  • \$\begingroup\$ No worries! we all start somewhere :) \$\endgroup\$ Commented Jun 16, 2017 at 21:09