Solution for Flipboard's tech challenge