How to do an analysis in 5 steps
Step 0: It is good to start by putting your code in.
unsigned int factorial (unsigned int n){
unsigned int rc = 1;
//multiplying 1*1 gives 1 so we don't start from 1
for (unsigned int i=2;i<=n;i++){
rc=rc*i;
}
return rc;
}```cpp
put your code here. code will be c++ syntax formatted
``` Step 1: Establish variables and functions (mathematical ones):
Step 2: Count your operations
Step 3: Establish the Mathematical Expression for T(n)
Step 4: Simplify your Equation
Step 5: State your final result.
Last updated