Suppose the test is like:

21 71 217
after sorting and msb appending we get: 217 712 217
sort: 217 217 712

here we have 2 same elements 217 and 217 so we remove the 7 from the
following logic:

1.if msb > lsb we delete from the 2nd 217.else
2.we delete 7 from 1st one.

so this gives 2121771

if it wud have been 41 200 412->412 200 412->200 412 412
here we will remove 2 from last one.giving 20041241 instead of 20041412 .

On Sat, Aug 21, 2010 at 12:26 PM, BALARUKESH SIVARAMAN <
sbalarukesh1...@gmail.com> wrote:

> @Nikhil
> I am clear with your first 2 algos but not with the change u introduced
> ie., adding a check. please give a working example....
>
> --
> 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<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thanks & Regards
Nikhil Agarwal
Senior Undergraduate
Computer Science & Engineering,
National Institute Of Technology, Durgapur,India
http://tech-nikk.blogspot.com
http://beta.freshersworld.com/communities/nitd

-- 
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