Netflix interview question

threading safe algorithm and coding