Yes, you are right. A slight modification is needed to handle repeated characters. I have already posted that in this group. https://groups.google.com/group/algogeeks/msg/afb18610819dbd90
On Jul 28, 10:56 pm, varun pahwa <varunpahwa2...@gmail.com> wrote: > @amit:: I think ur solution will give wrong answer if all the characters are > not unique. > > > > > > On Thu, Jul 28, 2011 at 11:13 PM, SAMMM <somnath.nit...@gmail.com> wrote: > > >http://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotte... > > > U can try this too .. Without any recursion ... > > > -- > > 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. > > -- > Varun Pahwa > B.Tech (IT) > 7th Sem. > Indian Institute of Information Technology Allahabad. > Ph : 09793899112 > Official Email :: rit2008...@iiita.ac.in > Another Email :: varunpahwa.ii...@gmail.com > > People who fail to plan are those who plan to fail. -- 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.