Nice interview question

multithreading code questions, explain, fix and improve.