| |
GeekInterview.com > Placement Papers > Intel > Programming
| Print | |
Question: Efficiency of sorting bubble, merge & memory efficiency for both best & worst case?
|
| August 08, 2007 02:58:06 |
#1 |
| mmh |
Member Since: Visitor Total Comments: N/A |
RE: Efficiency of sorting bubble, merge & memory e... |
Efficiency of bubble sort = O(N^2) Merge is a divide-and-conquer = O(N * log N)
Worst case: List is bigger than main memory. Bubble sort doesn't work. Best case: List is very small, bubble sort may be faster, due to less overhead. |
| |
Back To Question | |