edited by
1,820 views
1 votes
1 votes
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)
edited by

1 Answer

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

option B should be the answer

Related questions

1 votes
1 votes
1 answer
1
Markzuck asked Jan 6, 2019
501 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 votes
0 votes
1 answer
2
Markzuck asked Dec 29, 2018
791 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 votes
1 votes
0 answers
3
1 votes
1 votes
1 answer
4