Pulley interview question

You can find the question and solution here here: https://github.com/tp00012x/pulley