Tesla interview question

Multithreading problem with an array input