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,
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
],str[j]);
}
On 10/31/07, Somesh Jaiswal [EMAIL PROTECTED] wrote:
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
location or from a Microsoft Student.(c) 2007
Microsoft Corporation
--
\\\///
/ \
| \\ // |
( | (.) (.) |)
o00o~~(_)~~o00o~
Somesh Jaiswal,
B.Tech (Final Yr)- CSE,
KNIT