[algogeeks] Re: Odd Even Sort array

2011-06-08 Thread rj7
negate all the even indices sort the array no extra space. just an idea!! -- 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

Re: [algogeeks] Re: Odd Even Sort array

2011-06-08 Thread hary rathor
here DP is more effective -- 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,

[algogeeks] Re: Odd Even Sort array

2011-05-28 Thread bittu
@subramania jeeva ..can we have example with explanation as algorithmic approach is fine..!!! Thanks Shashank -- 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

Re: [algogeeks] Re: Odd Even Sort array

2011-05-28 Thread subramania jeeva
#includestdio.h #includealgorithm using namespace std; int heap_size1,heap_size2; int main() { int n,a[100],j,k; scanf(%d,n); for(int i=1;i=n;i++) scanf(%d,a[i]); if(n%2) { heap_size2=n/2+1; k=n-1; }