Computer Science, asked by harshaezhil6677, 11 months ago

Explain the various operation of stack with an example for each operation.

Answers

Answered by Anonymous
0

RAM RAM

ANSWER ==

Exᴀᴍᴘʟᴇs: 

  • ʟᴇᴛᴛᴇʀ ʙᴀsᴋᴇᴛ, sᴛᴀᴄᴋ ᴏғ ᴛʀᴀʏs, sᴛᴀᴄᴋᴏғ ᴘʟᴀᴛᴇs. Tʜᴇ ᴏɴʟʏ ᴇʟᴇᴍᴇɴᴛ ᴏғ ᴀ sᴛᴀᴄᴋ ᴛʜᴀᴛ ᴍᴀʏ ʙᴇ ᴀᴄᴄᴇssᴇᴅ ɪs ᴛʜᴇ ᴏɴᴇ ᴛʜᴀᴛ ᴡᴀs ᴍᴏsᴛ ʀᴇᴄᴇɴᴛʟʏ ɪɴsᴇʀᴛᴇᴅ. Tʜᴇʀᴇ ᴀʀᴇ ᴏɴʟʏ ᴛᴡᴏ ʙᴀsɪᴄᴏᴘᴇʀᴀᴛɪᴏɴs ᴏɴ sᴛᴀᴄᴋs, ᴛʜᴇ ᴘᴜsʜ (ɪɴsᴇʀᴛ), ᴀɴᴅ ᴛʜᴇ ᴘᴏᴘ (ʀᴇᴀᴅ ᴀɴᴅ ᴅᴇʟᴇᴛᴇ). Tʜᴇ ᴏᴘᴇʀᴀᴛɪᴏɴᴘᴜsʜ(x) ᴘʟᴀᴄᴇs ᴛʜᴇ ɪᴛᴇᴍ x ᴏɴᴛᴏ ᴛʜᴇ ᴛᴏᴘ ᴏғ ᴛʜᴇsᴛᴀᴄᴋ.

hope it's helpful

JAI MAHAKAL

Answered by Anonymous
1

Answer:

Explanation:

Examples: letter basket, stack of trays, stack of plates. The only element of a stack that may be accessed is the one that was most recently inserted. There are only two basic operations on stacks, the push (insert), and the pop (read and delete).

Similar questions