tag:blogger.com,1999:blog-6314876008291942531.post6718392398892348752..comments2024-01-14T00:36:43.430-08:00Comments on Antonio Gulli's coding playground: implement a deque using stacksUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6314876008291942531.post-89117198452647955212011-09-21T14:58:05.332-07:002011-09-21T14:58:05.332-07:00Have 2 stacks(say stack1 and stack2). Push into on...Have 2 stacks(say stack1 and stack2). Push into one stack (say stack1)<br /><br />To perform pop operation, check if stack2 contains any element,if yes then pop stack2. else transfer n-1 elements from stack1 to stack2 and return nth element.Algo_loverhttps://www.blogger.com/profile/11480466894192433586noreply@blogger.com