Since these questions are all multiple choice I'm going to write down the write answers here
Name | Answer |
---|---|
LOOP_CMPL | O(N + M) time, O(1) space |
NESTED_CMPL | O(N * N) time, O(1) space |
NESTED_CMPL2 | O(N*N) |
CHOOSE4 | X will always be a better choice for large inputs |
Name | Answer |
---|---|
WHILE_CMPL | O(log N) |
NESTED_CMPL3 | O(N) |
Name | Answer |
---|---|
CHOOSE1 | n^3 / (sqrt(n)) |
CHOOSE2 | f3, f2, f4, f1 |
CHOOSE3 | c |
Name | Answer |
---|---|
REC_CMPL1 | O(N) |
REC_CMPL2 | O(2^(R + C)) |
Name | Answer |
---|---|
AMORTIZED1 | O(N) |