None of the programs compile, so I would guess O(1).
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
A description of how the number of steps it takes for an algorithm changes with respect to the algorithm's input.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
Ans(1) T(n) = O(n^3)
Wrong.(exact time complexity=(10*(n^2)*(n+1))/2
There's no such thing as 'exact' time complexity unless you define what abstract machine it's running on.
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177