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