O(4+7n) -> O(n)
O(4+7n) -> O(n)
O(4+7n) = O(n)
O(n)
O(4+7n) ==> O(n)
Big O(4 + 7n) Big 0(n)
O(n), when we have two for loops both of them is O(n) so sum of them is O(2n) but we neglect the constants when it comes to BigO so as a result it will be O(n)
O(n)
BigO(4+7n) --> O(n)
It will be O(4 + 5n) as per the previous video solution but generally, I believe it should be O(n)
o(n)
O(N) - 2 loops - 2 different operations being executed linearly
simplified to O(n)
BigO (4 + 7n)
if we really want to get technical: O(6 + 9n)
let a = 5; let b = 10; let c = 50; // O(3) let i = 0 // O(1) i < input // O(n) i++. // O(n)
let x = i + 1; let y = i + 2; let z = i + 3; // O(3n)
let i = 0 // O(1) i < input // O(n) i++. // O(n)
let p = j * 2; let q = j * 2; // O(2n)
let whoAmI = "I don't know"; // O(1)
O(2^n)
Simplified to O(n).
O(4+5n)
O(4+7n)
O(7n+4)
O(n)
O(4+7n) => O(n)
O(4+5n)
O(4+7n)
O(4 + 7n)
O(n)
O(4 + 7n)
o(4+7n)
O(4 + 7n)
o(4+5n)
O(4+7n) ~ O(n)
o(n)
o(n)
O(n)
O(4+7n) = O(n)
Wondering why it is O(4+5n) instead of O(4+7n)
O(n)
O(4 + 7n)
O(4+7n)==O(n)
4 + 5n == O(n)
O(4 + 7n) O(n)
O(n)
O(n)
O(N)
O(n)
Big O: 4 - O(1) & 7 - O(n), i.e O(4 + n + n + n + n + n + n + n) = O(4 + 7n) implies to O(n).
Big O(4+ n + n + n + n + n) => O(4+5n) => O(n)
O(n)
(4 + 5n) >>> O(n)
O(n)
4(5 * n)
O(n)
O(n)
O(n)
O(4) + 5n
(O4+O5)=O(n)
(O4+7n)=O(n)
what is the big 0?
function multiply(input){
if(input<=0){
console.log("i should be greater than 0");
}else{
for(i=1; i<=10; i++){
let mult = i*input;
console.log(${input}*${i}=${mult}
);
}
}
}
multiply(10);
O(4 + 5n) 4 is the constant time because, irrespective of inputs its always operations remain constant outside the for loop, whereas for loop and the statements under that will have an equal number of operations based on a number of inputs so it is 5n. hence it is O(4 + 5n)
O(n)
O(4 + 7n)
O(4 + 5n) ==> O(n)
O(n) doesnt matter if its 5n or 7n :P
O(5n+4) => Simplified to O(n)
5n, not 7 because even though the two operations in the second for loop are multiplication, we only count the assignment, not the multiplication itself. (I think :) )
4+7n
O(4+7n) => O(n)
4+5n
4+ 7n
O(4+7n) Simplify => O(n)
O(7n+4)
O(1 + 1 + 1 + n + n + n + n + n + n + n + 1) = O(4 + 7n) = O(n)
O(N) as it is the highest degree of N the function is depending on
O(1+1+1+n+n+n+n+n+n+n+1) -> O(4+7n) -> O(n)
O(4+5n)
O(n)
O(n)
O(n)
O(n)+O(n) = 2*O(n)≈ O(n)
4 + 7n -> O(4 + 7n) -> O(n)
It is O(N) as we can drop constant from O(2N)
O(n)
O(4+7n) --> O(n)
O(n)
O(n)
O(n)
O(4+7n)
O(n)
O(4+7n)
Still O(n), where n = input
O(4+7n) || O(n)
O(n)
Big O (4 + 7n) -> O(n)
O(n )
BIG O(7n+4)
O(n)
O(n)
Big O (4 + 7n)= O(n)
O(n)
This is still O(n) b/c the two loops execute sequentially.
O(n) , while ignoring the constants