Solutions to random programming challenges I encounter