A & B are the concatenation of A and B. Set the following order relation
between the numeric strings
A <= B iff A & B <= B & A

Wladimir Araujo Tavares
*Federal University of CearĂ¡

*




On Sat, May 28, 2011 at 1:54 PM, sunny agrawal <sunny816.i...@gmail.com>wrote:

> @Logic King
> No, My algo will take only O(nlgn) where n is no of elements.
>
> what i mean by editing the comparision function cmp function of sort of
> <algorithm.h>
>
> sort(a,a+n, cmp);
>
> where cmp is the comparision function defined in my prev. post
> it will take equal no. of comparision as in sorting. just now overhead of
> comparision is increased.
> instead of just > or <  here it is order of no of digits in a no, which is
> atmost 10 for int or 20 for long ints.
> so O(20*n*lgn)
>
> --
> Sunny Aggrawal
> B-Tech IV year,CSI
> Indian Institute Of Technology,Roorkee
>
>  --
> 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