function someFunction(n) { for (var i=0;i - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
26 Jun 2020 01:04 AM study24x7 study24x7

function someFunction(n) {
for (var i=0;i<n*1000;i++) {
for (var j=0;j<n*20;j++) {
console.log(i+j);
}
}
}
Time complexity of the above JavaScript function is

A

O(n)

B

O(n*n)

C

O(20000n)

D

O(20000*n*n)

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles