Faster together? We'll see :)

  • 5
  • Locked
1. Understand what we're dealing with and how it works. 2. Create a public static SortThread class, whose run method uses the sort method to sort the static array testArray.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 39 , Greenfield, USA, United States
17 September 2021, 22:37
There are some interesting things to learn in this task, but contrary to the task name, there is no measuring of the passage of time here. One of the things that is interesting... the process becomes more inefficient later in the loop. When I ran this, it counted from 999 to 990 before it ran into any problems. I scrolled all the way to the end of the output line and found many repeated digits at the end - it could not even get more than two numbers in a row correctly and every number displayed was repeated at least 3 times. Would be interested in the explanation for this.
Hưởng Nguyễn Công
Level 27 , Hanoi, Viet Nam
18 October 2019, 07:36
:D, is that a trap? I have tried to measure the time it take when it calculates, The amazing thing is 10 threads takes twice as much time as the one thread when calculation, even when my computer has 4 cores.
nickyy
Level 18 , Diou, France
15 October 2020, 07:20
Did you use Thread.join()?
Ahmed
Level 23 , Amsterdam, Netherlands
7 July 2019, 10:09
I solve it but i have no idea what i did :\
remote87
Level 18 , Sofia, Bulgaria
22 March 2021, 14:10
Same here :D