Pinterest interview question

a more complex look and say problem