I think create a volatile sorted list class level variable and assign the values in the each thread, once both of the threads are finished, iterate through the sorted list to print the outcome? Please correct me.
Interviews2 answers
What is the difference between WaitOne and WaitAny?
2 Answers
Raj GuptaPosted Jan 6, 2022, 8:24 PM EST
Here is the great explantion: https://stackoverflow.com/questions/14732425/eventwaithandle-difference-between-waitany-and-waitone
Shweta LodhaPosted Aug 31, 2021, 12:34 PM EDT

