223 views

Please log in or register to answer this question.

Related questions

630
views
1 answers
1 votes
Sajal Mallick asked Nov 28, 2023
630 views
Consider the problem that given a set Sof n integers and another integer x, whether or not there exist two elements in S whose sum is exactly x. What is the worst ... in dynamic programming? Then complexity should be O(n^2).How O(n logn)?
462
views
1 answers
0 votes
Sachdev aprajita asked May 23, 2019
462 views
Finding the running time of the following algorithm.$Procedure$ $A(n)$ $\textrm{ if (n}<=\textrm{2) then return 1 ;}$ $else$ $Return(A(\left \lceil \sqrt{n} \right \rceil))$
1.1k
views
1 answers
1 votes
shikharV asked Nov 15, 2015
1,083 views
The answer to the above problem is A but I am expecting it to be D as constant amount of work is required to solve each subproblem.
242
views
0 answers
0 votes
Sajal Mallick asked Nov 27, 2023
242 views
As we have to select maximal set of “non overlapping” activities. So like job scheduling algo of greedy we can solve it. So according to that complexity must be O(n logn). But ans is (b). Anyone please explain.