in Programming in C recategorized by
2,402 views
1 vote
1 vote
What is the  ascending wise order of sorting algorithms which takes least time and least space to sort the elements?
in Programming in C recategorized by
2.4k views

1 Answer

1 vote
1 vote
i think it should be heapsort because time complexity is O(n log n) and space complexity is O(1)

4 Comments

i am stil not clear with the reason that why Quick sort is better and faster.

please dont copy and paste from quora that i can also do .

if you can please explain with proper reason please tell by giving example
0
0
Example is there in my previous comment. and i also read that allocation stack space is cheap. If my comments are not making sense then i'm sorry but i tried :)
1
1
Merge sort take time complexity as O(nlogn) and space complexity as O(n). I think this is sorting algo take most time in respect of the time complexity as well.
0
0