✅ Algorithm analysis
Can someone help me understand how we got this formula to calculate time efficiency from this code?
this is the formula: f(n) = n2/2 + n/2, which is O(n2)
The formula goes like this, 1 + 2 + 3 + 4 + ... + N but i have no idea how to connect the dots. Thanks!
this is the formula: f(n) = n2/2 + n/2, which is O(n2)
The formula goes like this, 1 + 2 + 3 + 4 + ... + N but i have no idea how to connect the dots. Thanks!