3 votes 3 votes Let we have 3 steps of an arbitrary program fragment whose running times are $O(n^2), \: O(n^3)$ and $O(n\log n)$, then the running time of whole program is $O(n^3)$ $\Omega(n^3)$ $\Omega(n \log n)$ $\Theta(n^6 \log n)$ Algorithms go-alogrithms-1 algorithms asymptotic-notation time-complexity + – Bikram asked Oct 4, 2016 Bikram 518 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes Complexity of algorithm determined by slowest program fragment. So it will be $O(n^3)$ and we can not select $\Omega(n^3)$ in absence of lower bound data. Digvijay Pandey answered Oct 11, 2016 • selected Nov 12, 2016 by dd Digvijay Pandey comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments umang_16 commented Dec 26, 2016 reply Follow Share how can we be sure if the segments are not interlinked ? 0 votes 0 votes Pranav Kant Gaur commented Jan 5, 2017 reply Follow Share I am a bit confused...does the problem statement imply that the program has only the given 3 steps?...I was thinking of an option like 'information insufficient'. 0 votes 0 votes Abhinav93 commented Jan 11, 2017 reply Follow Share @Arjun sir what if these are nested steps , the question does not explicitly say that these are independent steps 0 votes 0 votes Please log in or register to add a comment.