But still the constraint will be the length of string member per node. To make it dynamic we'll have to add each node a linked list having the words.
On 10/31/07, Sumedh Sakdeo <[EMAIL PROTECTED]> wrote: > > store the words in linked list while taking the input... As they have not > mentioned constraints on data structure .. > and reverse the linked list... > Regards, > Sumedh > > On 10/31/07, Somesh Jaiswal <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I was asked a question in an interview to Reverse the order of words in > > a sentence. > > eg. "Google is an awesome place to work" should be reversed as "work to > > place awesome an is Google" > > The solution should be efficient and shouldn't use any extra memory. > > > > Pl suggest me some solution. > > > > Regards, > > Somesh > > > > > > > > > > > > -- Somesh Jaiswal --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---