Question: Given an pseudo code for(i = 0; i < a. Length; i = i+1){ for(j = 0; j < a. Length; j = j+1){ if(even){
Given an pseudo code
for(i = 0; i < a. Length; i = i+1){
for(j = 0; j < a. Length; j = j+1){
if(even){
A[i, j] = 1;
}
}
}
1) what is the time and space complexity in terms of the big-o given that there is X rows and R columns?
2) what is auxiliary space compare to space complexity, you can use the algorithm above to explain.
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
1 Answer Oalength 2 If we consider alength n then B... View full answer
Get step-by-step solutions from verified subject matter experts
