3 ms·
This hardly works at all so I am skeptical of the benefits it offers learners. Even using just for loops it gets tripped up and says the following code is O(n)
by charcircuit 5y ago
This hardly works at all so I am skeptical of the benefits it offers learners. Even using just for loops it gets tripped up and says the following code is O(n) when it isn't.
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j++) {
}
}