@Rahul

Agree with your approach. When you say "merge the last root(n)
elements with the starting elements", it means you are doing something
like merge sort using an additional O(n) space. Correct me if I am
wrong. This should give O(n) overall time complexity.

How about an in - place approach? Some thoughts on this?


On Aug 26, 10:22 pm, Rahul Singal <rahulsinga...@gmail.com> wrote:
> merge sort or quick sort or insert last root(n) element . This will take max
> n  time . now merge the last root(n) element with the starting element .this
> will take n time . so final time complexity is n  <  nlog(n)
>
> Rahul

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to