For the following program fragment you will (a) write down the total work done by each program statement (beside each statement), (b) compute an expression for the total time complexity, T(n) and derive thhe big Oh complexity, showing all steps to the final answer. I am having a lot of trouble starting off.
for ( i = 0; i < n; i++) {
for ( j = 0; j < 1000; j++) {
a[ i ] = random(n) // random() takes constant time
}
}