[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread adak
Yes, but from the OP I understood he could NOT use any of the library functions. Your algo is the way to go, however. Giving him something to do is good. Adak --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algor

[algogeeks] Re: check string A and B isPermutation ?

2006-04-13 Thread Gene
Let's be real. I can't imagine a application where it could make much of a difference. Can you? Almost certainly it is simplicity and beauty and angels dancing on pins we're talking about. By the way, you can add about 16 characters to my function above and it becomes a true sort (not a sort i

[algogeeks] Re: check string A and B isPermutation ?

2006-04-13 Thread Kevin
I agree this is a different approach. But in terms of speed and space, I wonder what is its advantages there? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send emai

[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread Padmanabhan Natarajan
If its C/C++, the program is as simple ascin >> num;char buf[20]; sprintf(buf,"%d",num); int i = 0;while(s[i] == '0' && s[i + 1] != '\0')  i++;len = strlen(buf) -1;while(len >= i)  cout << s[len];cout << endl;On 4/13/06, adak <[EMAIL PROTECTED]> wrote: I agree with you (although it can be difficu

[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread adak
I agree with you (although it can be difficult if you choose a tough algo), but since he posted for help, wouldn't it be nice to give him a bit of guidance? I'm not saying do his whole assignment for him, but a starting point. Adak --~--~-~--~~~---~--~~ You rece

[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread adak
aatish19, I think I've steered you wrong! (sorry) I just thought I'd "flush out" the ideas in my post above, and it proved much more difficult than I thought. Difficult enough that I'd now have to recommend just changing the numbers, as char's, and storing them in a char array, then just print t

[algogeeks] You must read this e-mail....it will change your financial life

2006-04-13 Thread bijaya Meher
Dear Friends, Internet business is growing to trillion dollar business. Please explore this opportunity. Are you aware of Residual/Royalty Income ? Are you aware of Leveraged Income ? If your answer is "yes" then why to wait, Please explore this opportunity below link. If "no" then you real

[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread [EMAIL PROTECTED]
thankx brother --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

[algogeeks] Re: Assignment: Print reverse order

2006-04-13 Thread adak
For a number to be reversed, your instructor may want to see you "break apart" the number. So 1,234 is really: 1 x 1,000, 2 x 100, 3 x 10 4 x 1. In a 6 element array, (which will handle everything up to a billion), we would get these values perhaps: num[0] == 4, (the one's place) num[1] == 3, (th