{"id":6361,"date":"2025-11-10T11:34:34","date_gmt":"2025-11-10T06:04:34","guid":{"rendered":"https:\/\/study.madeeasy.in\/?p=6361"},"modified":"2025-11-13T12:01:07","modified_gmt":"2025-11-13T06:31:07","slug":"simple-representation-of-a-stack","status":"publish","type":"post","link":"https:\/\/www.madeeasy.in\/study\/cs-it\/simple-representation-of-a-stack","title":{"rendered":"SIMPLE REPRESENTATION OF A STACK"},"content":{"rendered":"<p>Given a stack S = (a[1], a[2],&#8230; a[n]) then we say that a1 is the bottom most element and element a[i]) is on top of element a[i \u2013 1], 1&lt; i \u2264 n.<\/p>\n<p><strong>Implementation of stack:<\/strong><\/p>\n<p>(i) Array (static memory)<\/p>\n<p>(ii) Linked list (dynamic memory).<\/p>\n<p><strong>ADT OF STACK<\/strong><\/p>\n<p>A stack S is an abstract data type (ADT) supporting the following three methods:<\/p>\n<ul>\n<li>Push(n): Inserts the item n at the top of stack. An error occurs if the stack is full.<\/li>\n<li>Pop( ): Removes the top element from the stack and returns that top element. An error occurs if the<br \/>\nstack is empty.<\/li>\n<li>Peek( ): Returns the top element and an error occurs if the stack is empty.<\/li>\n<\/ul>\n<p><strong> OPERATIONS OF STACK<\/strong><\/p>\n<ul>\n<li>PUSH operations<\/li>\n<li>POP operations<\/li>\n<li>PEEK operations<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Given a stack S = (a[1], a[2],&#8230; a[n]) then we say that a1 is the bottom most element and element<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,94],"tags":[1882,1881,1884,1885,1883],"class_list":["post-6361","post","type-post","status-publish","format-standard","hentry","category-cs-it","category-operating-system","tag-abstract-data","tag-implementation-of-stack","tag-peek-operations","tag-pop-operations","tag-push-operations"],"_links":{"self":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/comments?post=6361"}],"version-history":[{"count":0,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/posts\/6361\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/media?parent=6361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/categories?post=6361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.madeeasy.in\/study\/wp-json\/wp\/v2\/tags?post=6361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}