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
Wittaler [7]
3 years ago
11

What is the difference between a queue and a stack?

Computers and Technology
1 answer:
Zinaida [17]3 years ago
7 0

Answer:

Difference between Queue and Stack are as following:-

  1. Queue is a FIFO(First In First Out) type data structure while Stack is a LIFO(Last In First Out) type data structure.
  2. The insertion and deletion of elements from the queue happens from two ends insertion at the tail and deletion from the front.While the insertion and deletion from stack happens from one end only that is top.
  3. The insertion and deletion operation in queue are referred as enqueue and dequeue. While in stack they are referred as push and pop respectively.
You might be interested in
Personal Web Page Generator Write a program that asks the user for his or her name, then asks the user to enter a sentence that
Fudgin [204]

Answer:

see explaination

Explanation:

The following code is in python 3.5 and above:

# Create a main method

def main():

# Accept name from the user

name = input("Enter your name: ")

# Accept describe yourself from the user.

describe = input("Describe yourself: ")

# Create a file object

f = open('person.html','w')

# Creat a string to store the html script.

message = """<html>

<head>

</head>

<body>

<center>

<h1>"""+name+"""</h1>

</center>

<hr/>"""+describe+"""<hr/>

</body>

</html>"""

f.write(message)

f.close()

main()

7 0
3 years ago
One way to prepare for filing the PROFILE is to:
kozerog [31]
I think I am not sure that it is probably b
8 0
3 years ago
Read 2 more answers
What is the best programming language
pashok25 [27]

Answer:

Ther are 8 best programming language :

• Javascript

• Swift

• Scala

• Go

• Python

• Elm

• Ruby

• C#

4 0
2 years ago
The border that defines the outer boundary of a shape or other object
Over [174]
The answer is outline
8 0
2 years ago
A customer survey asked respondents to indicate their highest levels of education. The only three choices in the survey were hig
solong [7]

Answer:

27%

Explanation:

100% = 26% + 47% + x%

100% = 73% + x%

27% = x%

4 0
3 years ago
Other questions:
  • What will happen if you change data that is used in a formula
    10·1 answer
  • When are numbered lists generally used?
    14·2 answers
  • There was a thunderstorm in your area and the power is out. The traffic lights are not functioning. Explain what you should do w
    8·2 answers
  • In terms of object-oriented programming,after class is defined,________ can be created for that class.
    15·1 answer
  • Which is an example of an incremental approach to solving a problem?
    15·1 answer
  • the term that is used to describe how many bits are used in each pixel to show the number of colours used
    11·1 answer
  • When individuals not involved in the development process are asked to test the game, this is called ________ group testing.
    11·1 answer
  • Write a program that reads a file called 'test.txt' and prints out the contents on the screen after removing all spaces and newl
    7·1 answer
  • You are given a graph G = (V, E) with positive edge weights, and a minimum spanning tree T = (V, E’) with respect to these weigh
    14·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!