1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
guajiro [1.7K]
3 years ago
13

Whatis the restriction placed on the push operation for an array-based implementation of a stack?

Computers and Technology
1 answer:
tatuchka [14]3 years ago
8 0

Answer:

if the number of elements in the array are equal to the size of the array then return -1.

Explanation:

We are implementing stack using array.Stack is a LIFO(Last In First Out) type data structure.Insertion and deletion is from one end only.

So while push operation or inserting elements in the stack using array we have to check that the capacity of array is not reached.If reached then no element can be inserted in the stack.If not then we can insert element in the stack.

You might be interested in
A ____ is a type of program that uses a grid to organize and work with data.
VLD [36.1K]

Question: A ____ is a type of program that uses a grid to organize and work with data.

Answer: cells

Explanation: cells store data and other things in columns and organize them


Question: Explain how to create a Pivot table?

Answer:  1.Click a cell in the source data or table range.

2.Go to Insert > Recommended PivotTable.

3.Excel analyzes your data and presents you with several options, like in this example using the household expense data.

4.Select the PivotTable that looks best to you and press OK.

question answered by

(jacemorris04)

4 0
3 years ago
You have already learned about the various types of lenses. Now, conduct online research and mention as many possible types of l
Alika [10]

Answer:

nature and landscape photography: wide and ultra wide lens

wildlife photography: telephoto lens.

architectural and interior photography: wide, ultra-wide, tilt-shift lenses,

product photography: macro lenses, prime lenses, medium telephoto lenses (Up to 150mm)

insect photography: macro lenses

portrait photography: prime lenses, wide angle lens, medium telephoto lenses

wedding photography: wide-angle lenses, prime lenses

journalistic photography: wide, ultra-wide , telephoto lenses

sports photography: telephoto lenses

jewelry photography: macro lenses

Explanation:

5 0
3 years ago
Write the function evens which takes in a queue by reference and changes it to only contain the even elements. That is, if the q
kvv77 [185]

Answer:

Explanation:

The following code is written in Java it goes through the queue that was passed as an argument, loops through it and removes all the odd numbers, leaving only the even numbers in the queue. It does not add any more data structures and finally returns the modified queue when its done.

  public static Queue<Integer> evens(Queue<Integer> queue) {

       int size = queue.size();

       for(int x = 1; x < size+1; x++) {

           if ((queue.peek() % 2) == 0) {

               queue.add(queue.peek());

               queue.remove();

           } else queue.remove();

       }

       return queue;

   }

3 0
3 years ago
A hub transmits all incoming messages to all of its ports except the port where the messages came in. A switch usually sends mes
leonid [27]

Answer:

MAC Addresses (Destination and Source MAC address)

Explanation:

A switch has 3 primary functions:

  • Forward frames
  • Learn addresses
  • Avoid loops

An Ethernet frame has the header, data and trailer and there are two specific fields in the header that helps the switch to know where to send data in future transmissions.

  • destination MAC address
  • source MAC address

every Ethernet frame has this and when the frame hits a switch or any device, any device can look at it ( an Ethernet frame ) and know where it is suppose to go and where it came from.

Every switch has a MAC address table where it stores MAC addresses of different computers on the network.

Example:

When a PC1 sends a frame to PC2 through a switch, the switch looks at the header of the Ethernet frame for the source mac address and adds the source MAC address to its MAC address table and also the port that it came through.

simply put:

A switch looks at the source MAC address to see if it knows it already, if it does. Great! no need to add it again to it's address table.

If it doesn't, it adds it's source address and the port that the frame came from.

This basically how the switch populates its MAC address table.

3 0
3 years ago
Read 2 more answers
Which principle of design does a designer apply when they create rhythmic movement in a garment by using recurring pleats or det
WITCHER [35]

Answer:

Repetition, and regular rhythm

Explanation:

Its certainly repetition method, and repetition method is of three types which are repetition, pattern and rhythm.

Remember repetition can be boring at times as we need to read same thing again and again. However, repetition sometimes can be good like the one we are referring to, and the other one can be like placing the logo or menu at same place in all web page. And its since it creates a habit in us for reading the web pages, And hence we can understand faster, and it looks please to our eyes hence as well.  

4 0
3 years ago
Other questions:
  • which of the following is true about both the cyber community and the real community like the one you live in,i will give 10 poi
    6·1 answer
  • Ryan is looking at investment opportunities as a cloud service provider. He wants to invest in a deployment-based cloud model th
    11·2 answers
  • Which searching method requires that the list be sorted?
    5·1 answer
  • A network host with an IP address of 192.168.10.200 wants to send a message to a destination computer with an assigned IP addres
    6·1 answer
  • Swiping and pinching are graphical user interface (gui) _____________.
    7·2 answers
  • A browser allows you to set preferences for using the browser. These preferences include all of the following except
    7·1 answer
  • Pride Group of Companies is making tremendous profits in different categories of electronic goods. The group of managers have to
    12·1 answer
  • 2.13 LAB: Branches: Leap Year
    11·1 answer
  • Explain software piracy and Hacking​
    13·2 answers
  • What are stored procedures? What kind of attack do stored procedures protect from? Identify two reasons why stored procedures ar
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!