Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6089543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:06:42+00:00 2026-05-23T12:06:42+00:00

If you look at the Container ADT (abstract data type) as a black box,

  • 0

If you look at the Container ADT (abstract data type) as a black box, it provides two functions:

1. put(C, x)
2. get(C)

The first function will put the object x into container C. The second will retrieve the “next” object from container C, where “next” depends on what type of container you want. A stack implementation would return the element that was most recently put into the container (also known as a FILO ADT).

My question is, in it’s most generic form, does the Container ADT function get() remove the element itself from the container, or does it simply return a reference to it for access, retaining the element in the Container?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:06:42+00:00Added an answer on May 23, 2026 at 12:06 pm

    if you have only put() and get(), get() must also remove the element, otherwise you won’t have access to the nth element for each n!=1.

    the idea is with enough get() oporations, you should be able to access each element in the container, and if get() doesn’t remove the element, sequential get()‘s will always return the same element, so only the first element is accessable.

    but it can be different for each implementation, of course. (for example, you can create a ADT with put(), get() and pop(), where get will only return the element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Look this code: <script type = text/javascript> function mouseClick (container) { container.appendChild (document.createTextNode (Can
look at this code, <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <script> function change() {
I am creating a container of JComponents which will look like a piano keyboard.
I find that my constructors are starting to look like this: public MyClass(Container con,
Look at this: $('form).submit(function (event) { $(':input.required').trigger('blur'); var num = $('.warning', this).length; alert(num);//Focus here!
Look at the following line of java: Mac.getInstance(HmacSHA1); If I put this in a
I have 3 columns that look something like this: <div style=width:900px;margin:0 auto id=container> <div
I would like to pass arbitrary container as an argument of function and iterate
I'm trying to use Boost's multi-index container for fast look up, but I'm having
I have a container div with a fix height defined. This div contains two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.