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.

3
  • 1
    \$\begingroup\$ Scala isn't the best golfing language, but you can save quite a few bytes by just writing a method instead of a whole app, that's allowed under typical golfing rules here. Additionally, instead of printing out the result, it's usually more byte efficient to just return the list. On Try It Online, you can put all the object extends app type stuff in the header and footer, to run your method without counting the irrelevant bytes. \$\endgroup\$ Commented Aug 13, 2019 at 14:42
  • \$\begingroup\$ In this case, you can save 36 bytes with: tio.run/… \$\endgroup\$ Commented Aug 13, 2019 at 14:46
  • \$\begingroup\$ 22 bytes \$\endgroup\$ Commented Sep 14, 2020 at 23:11