• edited by
2,504 views
1 1 vote
Consider you are playing game of shooting balloon and you are expected to shoot n balloons in the board. If you are a sharp shooter(100% accuracy) and for every two balloons you are able to shoot, one new balloon is inserted into the board, then what is the time complexity of this shooting procedure if the board has to be emptied?

(a) O(1)

(b) O(n)

(c) O(logn)

(d) O(n2)

1 Answer

0 0 votes
O(2n) = O(n).

option B should be the answer
Position:
Show:

Related questions

2 2 votes
0 0 answers
968
968 views
1 1 vote
1 1 answer
777
777 views
Markzuck asked Jan 6, 2019
777 views
Please show the ideal way to deal with such comparisons as I am getting g>=f IN genral what logic shall be followed to analyse such complex comparions?
0 0 votes
1 1 answer
1.6k
1.6k views
Markzuck asked Dec 29, 2018
1,613 views
cant we write the recurrance relation for bar() as T(n) = 5T(n-1) + c,like cant we take both the recurrance call as combined as both have same parameter?and if not, then ...
1 1 vote
1 1 answer
2.8k
2.8k views
Ramij asked Dec 20, 2018
2,847 views
O($n^2$)O(n)O(nlogn)O($n(logn)^2$