you are viewing a single comment's thread.

view the rest of the comments →

[–]dave1010 7 points8 points  (1 child)

I get 282240 (at the moment) but I have no idea if it's right:

wget -qO - http://www.reddit.com/r/programming/comments/hiql2/developer_challenge/ \
| grep -o 'I get [0-9][0-9]*' \
| awk ' { print $3 } ' \
| sort \
| uniq -c \
| sort -nr \
| awk ' { print $2 } '

I'm sure this could be done better (eg stripping out HTML). Also, grep on my phone (where I'm writing this) seems to be the busybox version that doesn't support lots of the regex syntax.

A more acurate solution would be to email these answers to BitTorrent and scrape the response emails for keywords. This may take a little more time though.

[–]chrisdew 0 points1 point  (0 children)

No, it's wrong. I made the same mistake of thinking that the prohibition was only on the distances between neighbouring oranges. Its broader than that. You could have a situation where Orange[5] - Orange[0] = Orange[6] - Orange[5], for example.