Starting from:

$30

Homework 6 Create a tree with 2^18 nodes

Homework 6

Create a tree with 2^18 nodes in parallel, and initialize each node with a random number
between 0 and 1. Then, in parallel, traverse the tree and count the number of nodes whose value
is less than 0.5. You should use parallel tasks, and when the number of nodes at some level i in
the tree equal to the number of cores, do not create any more tasks but search the rest of the tree
sequentially. Time the time to do this sequentially and in parallel.

More products