The Complexity of Time Complexity
for (int i=1; i<=n; i*=2) {
for (int j=0; j<i; j++) {
for (int k=0; k<=n; k+=2) {
// Any O(1) operation
}
for (int k=1; k<n; k*=2) {
// Any O(1) operation
}
}
}
If you can truly understand the TC of the above ...
the-complexity-of-time-complexity.hashnode.dev6 min read