Digit Insurance interview question

ways to implement thread