top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the time complexities of some famous algorithms?

+1 vote
287 views

What are the time complexities of some famous algorithms like below:

Binary Search :
Merge Sort:
Insertion Sort:
Quick Sort:
Selective Sort:
Finding max & min for a given set of number:

posted May 31, 2014 by Kali Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Please get the time complexities of algorithms:

Binary Search :  O(logn)
Merge Sort:      O(nlogn)
Insertion Sort:  O(n*n)
Quick Sort:      O(nlogn)
Selective Sort:  O(n)

Finding max & min for a given set of number: O(3n/2 -2) 
or if you go strictly or principle then o(3n/2-2) = o(n)
answer May 31, 2014 by Amit Kumar Pandey
Similar Questions
+1 vote

Can anyone suggest how you can measure space and time complexities for any algorithms in C/C++?

+3 votes

I want to exit from the scanf after certain amount of time, how to proceed. Any pointer or suggestions?

+1 vote

What will be the behaviour of LTE MAC,RLC & PDCP layer once ue data transmission stops & starts again after some time?

0 votes

Given a string, add some characters to the from of it so that it becomes a palindrome.
e.g.
1) If input is "abc" then "bcabc" should be returned.
2) input -> "ab" output -> "bab"
3) input -> "a" output -> "a"

...