@deepika

yes, it's giving number of swaps.
still Linear time solution would be better :-)

On Fri, Jun 22, 2012 at 11:38 PM, deepikaanand <swinyanand...@gmail.com> wrote:
>
> will bubble sort give number of swaps??
>
> I tried the (bubble sort) code of 1,0,0,1,1,0,1 ====>swapcount = 5
> and for the array  (0,0,1,0,1,0,1,1)====>swapcount = 3
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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