If we use bubble sort or insertion sort then processor uses 1 core for calculation? Because I've already known about Merge Sort and power of recursion. Recursion make it possible to do many things at one time.
And I'm wondering if we use Merge Sort than processor uses more than one core for calculation?
Or recursion will only take more memory (RAM)?
Asked
Active
Viewed 91 times
0

Billal Begueradj
- 20,717
- 43
- 112
- 130

Yellowfun
- 418
- 1
- 9
- 21
-
1How can you predict how many cores a code can use :/ – minigeek Feb 11 '17 at 11:16
-
1Recursion = function calls in function call = more calls on the call stack = more RAM needed. Calculations in the function = CPU powr required. More function calls = more CPU power required. – Jankapunkt Feb 14 '17 at 11:01
-
Thy! @Jankapunk – Yellowfun Feb 14 '17 at 11:03
-
1You're welcome, but notice, that more CPU Power does NOT mean more CPU-cores! If you want to implement a threaded recursion you may read on it: http://stackoverflow.com/questions/706048/using-threads-and-recursion-in-java-to-calculate-fibonacci-numbers – Jankapunkt Feb 14 '17 at 11:07