@ Navin Kumar

Nice . Solution.
But
your  function also make a stack only. so you are using a stack[internal]
here.
but may be this one is allowed    :-)

On Thu, Jun 14, 2012 at 5:23 AM, Navin Kumar <[email protected]>wrote:

> void Reverse(struct Stack *S) {
>     int data;
>     if(IsEmptyStack(S)) return;
>     data=pop(s);
>     ReverseStack(S);
>     InsertAtBottom(S, data);
> }
>
> void InsertAtBottom(struct stack *S, int data)
> {
>    int temp;
>    if(!IsEmptyStack(S)){
>        push(S,data);
>        return;
>     }
>    temp=pop(S);
>    InsertAtBottom(S,data);
>     push(S, temp);
>
> }
>
>
> On Thu, Jun 14, 2012 at 2:44 PM, rahul patil <
> [email protected]> wrote:
>
>> to store items in stack you will need some DS. Do they mean you cant use
>> any auxillary DS than stack ?
>>
>>
>> On Thu, Jun 14, 2012 at 2:24 PM, Ashish Goel <[email protected]> wrote:
>>
>>>
>>> Best Regards
>>> Ashish Goel
>>> "Think positive and find fuel in failure"
>>> +919985813081
>>> +919966006652
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards,
>> Rahul Patil
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to