, , ,

[SOLVED] Csc6013 week 6 worksheet

$25

File Name: Csc6013_week_6_worksheet.zip
File Size: 226.08 KB

5/5 - (1 vote)

Russian Peasants Multiplication
1. Trace the Russian Peasants Multiplication algorithm for the following products.
Show each recursive call and the final result, as shown in the live session (table).
a. 64 * 13
b. 60 * 13
c. 59 * 13
Lomuto partition
2. Trace the Lomuto partition with the array:
a. A = [100, 33, 22, 213, 65, 29, 153, 199, 47, 181, 85]
Using A[10] = 85 as pivot the final array will be:
● A = [33, 22, 65, 29, 47, 85, 153, 199, 100, 181, 213]
In your trace, write down to each change in either i or j, stating: the values of i and j, swaps made, and elements divided into lesser than the pivot, greater than the pivot, and yet to compare.

Shopping Cart
[SOLVED] Csc6013 week 6 worksheet[SOLVED] Csc6013 week 6 worksheet
$25