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.

4
  • \$\begingroup\$ Oh fark, now after seeing the other answers I see what you mean about shortest answer. \$\endgroup\$ Commented Mar 8, 2015 at 6:19
  • 2
    \$\begingroup\$ While your solution is respectable, concise, and well-presented in its own right, you're correct that it's not quite a candidate for the problem at hand. \$\endgroup\$ Commented Mar 8, 2015 at 7:42
  • 1
    \$\begingroup\$ @BrettRyan You can make your code much shorter by removing unnecessary whitespace and using one-char variable names. You can also replace false by something like 5<4. \$\endgroup\$ Commented Mar 8, 2015 at 7:44
  • 1
    \$\begingroup\$ Thanks guys. It was my first attempt at participating in code challenges. I was just looking for some programming challenges and didnt realise the target was to get the shortest solution. :) Thanks for letting me participate. \$\endgroup\$ Commented Mar 8, 2015 at 8:39