X Interview Question

Write a Digg-like algorithm