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.

Required fields*

3
  • \$\begingroup\$ That's how it starts. :) \$\endgroup\$ Commented Mar 17, 2014 at 22:13
  • 1
    \$\begingroup\$ Some minor improvements: P and M are only used once each so it is a good idea to inline then (for a single invocation it works in almost all cases for two sometimes). m[c]!='S' can be shortened to m[c]<'S', also abs(z)==1 to abs(z)<2 or even -2<z<2. \$\endgroup\$ Commented Mar 18, 2014 at 7:55
  • \$\begingroup\$ Your "minor improvements" save me 47 bytes. I'm editing my answer. \$\endgroup\$ Commented Mar 18, 2014 at 15:01