• [deleted]
    + 1 comment

    It's a one liner if you're willing to do a brute force solution. Efficient solutions tend to be more sophisticated.