0 0 votes Which of the following statements is/are valid? 1. Time Complexity of QuickSort is Θ(n^2) 2. Time Complexity of QuickSort is O(n^2) 3. For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)). 4. Time complexity of all computer algorithms can be written as Ω(1) Algorithms time-complexity + – Surya Dhanraj 1.3k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments sourav. commented Sep 25, 2017 reply Follow flag Time complexity of all computer algorithms can be written as $\Omega \left ( 1 \right )$ $\Rightarrow$it is as good as saying that All algorithm should at least take constant time. $\Rightarrow$ It is as good as saying that All algorithm's best case will be atleast constant . $\Rightarrow$ $1$ i.e contant time is lower bound for any algorithm . That's right, no matter how efficient an algorithm is, it will take at least constant time . 0 0 replyShare Warlock lord commented Sep 25, 2017 reply Follow flag :) thanks alot 0 0 replyShare Shivam Chauhan commented Sep 25, 2017 reply Follow flag I think first is not valid: Time Complexity of QuickSort is Θ(n^2) The worst case of Quicksort has Time Complexity Θ(n^2) and Quicksort has a lower bound of Ω(n.lg(n)) on best case not Ω(n^2). Time Complexity of QuickSort is between Ω(n.lg(n)) and O(n^2) 0 0 replyShare Please log in or register to add a comment.
0 0 votes 2 is right answer . hem chandra joshi answered Sep 24, 2017 hem chandra joshi comment Share Follow See 1 comment 1 1 comment reply Nitesh Choudhary commented Sep 30, 2017 reply Follow flag 2 and 3 option is correct 4 th is wrong if time complete of any algorithm =1/n First is wrong n^2 is upper bound for quite sort 0 0 replyShare Please log in or register to add a comment.