✏️ Explanatory Question
If the efficiency of doIt() is O(n²), calculate the efficiency of the following segment:
for (i = 1; i <= n; i++) {
for (j = 1; j <= n - 1; j++) {
doIt();
}
}
If the efficiency of doIt() is O(n²), calculate the efficiency of the following segment:
for (i = 1; i <= n; i++) {
for (j = 1; j <= n - 1; j++) {
doIt();
}
}
Answer not available right now.