I was asked a similar question in an interview, and the interviwer told me that it is O(n^2), I have no idea how he got that!!
On Wed, Aug 3, 2011 at 1:47 AM, aanchal goyal <goyal.aanch...@gmail.com>wrote: > Can we prove this?? > > > On Wed, Aug 3, 2011 at 1:45 AM, Ravinder Kumar <ravinde...@gmail.com>wrote: > >> Its complexity is same as of finding the all combination if a given string >> . >> it is O(n!) >> >> >> >> >> -- >> *With Regards :* >> >> Ravinder Kumar >> B.Tech Final Year >> Computer Science and Engineering >> MNNIT Allahabad >> >> -- >> 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. >> > > > > -- > Regards,* > Aanchal Goyal*. > > -- Regards,* Aanchal Goyal*. -- 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.