@Kumar: For question 1, the answer is radix sort. It doesn't use data
comparisons at all.

Dave

On Nov 21, 12:04 am, kumar raja <[email protected]> wrote:
> if we have set of n elements then
>
> 1) which sorting method uses least number of comparisons??
>
> 2) which sorting method uses least number of swaps??
>
> 3) suppose the array is 2 8 4 6 5 9
> if we want to swap 8  and 5 the cost is 2(5-2)=6   .here 5 and 2 are
> indices of 5 and 8.
> so what sorting method minimizes the cost, i want the answer in general
> case ,not for this particular array. it is also called least distance
> sorting
>
> --
> Regards
> Kumar Raja
> M.Tech(SIT)
> IIT Kharagpur,
> [email protected]

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

Reply via email to