void pushreverse(int data)
{
int temp;
if(top==0)
{
push(data);
return;
}
else
temp=pop();
pushreverse(data);
push(temp);
}
int reversestack()
{
//static int arr[50];
int top2=0;
int i;
if(top==0)
{ return top2;
}
top2=pop();
reversestack();
pushreverse(top2);
}
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.
>
--
Regards
Lomash Goyal
*
*
--
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.