tag:blogger.com,1999:blog-768092900715584890.post7480121351209144881..comments2023-10-30T21:07:16.751+05:30Comments on Just Programming...: Stack with min operation in O(1)Anonymoushttp://www.blogger.com/profile/03841493835949936249noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-768092900715584890.post-9456972060202817892013-06-17T11:44:43.700+05:302013-06-17T11:44:43.700+05:30Thanks Maruti. I will make the changes.Thanks Maruti. I will make the changes.Anonymoushttps://www.blogger.com/profile/03841493835949936249noreply@blogger.comtag:blogger.com,1999:blog-768092900715584890.post-77207885778871089132013-06-17T00:40:58.066+05:302013-06-17T00:40:58.066+05:30your code has problem when user pushes items in or...your code has problem when user pushes items in order 4,3,2,1,5,2,1,1 and then if he pops once the min item returned after this step is 2 but in actual there is one more 1 present in stack.. corrected push operation would be as below<br />push {<br /> if (value <= s2.top()) s2.push(value)<br /> s1.push(value)<br />}<br /><br />Maruti Kutrehttps://www.blogger.com/profile/17765646540745945193noreply@blogger.comtag:blogger.com,1999:blog-768092900715584890.post-9550278497155546522013-03-04T09:48:55.286+05:302013-03-04T09:48:55.286+05:30The implimentation of stack using linkedlist is be...The implimentation of stack using linkedlist is below :)<br /><a href="http://msumca2012.blogspot.in/2013/03/ds-a62-operation-on-stack-in-linked-list.html" rel="nofollow"><br />Stack using Linked List></a><br /><br />... :-) .....Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-768092900715584890.post-43078759468107366732012-09-18T19:37:58.849+05:302012-09-18T19:37:58.849+05:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/06673976043065858712noreply@blogger.com