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
const2013 [10]
3 years ago
8

Queue is the LIFO structure. o True o False

Computers and Technology
1 answer:
Yakvenalex [24]3 years ago
7 0

Answer:

The answer is False.

Explanation:

By definition LIFO structure is defined by: Last In, First Out.

By definition FIFO structure is defined by: First In, First Out.

A queue has the basics operations push() and pop() where:

  • push(element) stores the element at the end of the queue.
  • element = pop() retrieves the element at the beginning of the queue.

For example:

If you insert the elements doing the push(e) and q.pop(e) operation:

Queue q;

Element e;

q.push(2); // q ={2};

q.push(5); // q ={2 , 5};

q.push(6); // q = {2, 5, 6};

q.pop(e); //  q ={5, 6}; e = 2;

q.push(12); q ={5, 6, 12};

q.pop(e); //  q ={6, 12}; e = 5;

Note: A stack is a LIFO structure.

You might be interested in
1. What is an object and what does it do?
Reptile [31]

Answer:

An object is an abstract data type with the addition of polymorphism and inheritance. Rather than structure programs as code and data, an object-oriented system integrates the two using the concept of an "object". An object has state (data) and behavior (code). Objects can correspond to things found in the real world.

Explanation:

3 0
3 years ago
After class a student asked why you would ever use a heap instead of a binary search tree. Provide a good explanation for why an
sertanlavr [38]

Answer:

Heap is useful when you want to find max/min element in the given list

BinarySearchTree is used if you need sorted elements of the list

Explanation:

Heap is Good at finding Min/Max and it's time complexity is  (O(1)), while BST is good at all finds (O(logN)). Insert is O(logN) for Heap and BSTstructures..

Max Heap ensures that elements on higher levels are greater than elements at lower level

MinHeap ensures that elements on higher levels are lesser than elements at lower level

BST gives sorted elements by following order (left,root,right).If we want sorted elements we can go with BST

5 0
3 years ago
The basic building blocks of java is known as<br><br><br><br>Reply fast! plzzzzzzzzzzz!!!
Nadya [2.5K]

Answer:

A class is the basic building block in Java.

8 0
3 years ago
What is the complete predicate in the sentence below? Looking up from his computer monitor, Jason mopped his brow, exhaled sharp
frozen [14]

Answer:

A. mopped his brow, exhaled sharply, and picked up his phone.

Explanation:

Predicate in a sentence talks about the actions relating to the subject of the sentence, Here, The complete predicate is option A.mopped his brow, exhaled sharply, and picked up his phone. because they were the actions performed by the subject (John) the subject in a sentence usually refers to the person, place, thing, etc (Noun).

3 0
3 years ago
If you omit the filename from a URL, the Apache web server displays a list of files and directories if the specified directory d
g100num [7]

Answer:

Default File

Explanation:

When a website is visited from a web browser without the explicit specification of the complete path of the file with the URL, the webserver will look for the file named index.html or index.php from the public_html files and render the contents of the file.

The name index. html or index.php is commonly used for the default page which is the page displayed to a visitor that does not specify a particular page for example (mysite/contact_us), so if the file path "contact_us" is omitted, the visitor will be taken to the "index" also known as the home page of "mysite".

6 0
3 years ago
Other questions:
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    7·2 answers
  • What type of network is a private network that belongs to an organization that can only be accessed by approved internal users?
    15·1 answer
  • 4. What is the simplest way to permanently get rid of an unwanted file?
    12·1 answer
  • Which quality allows programmers to modify a program as and when required
    11·2 answers
  • the ratio of length, breadth and height of a room is 4:3:1. If 12m^3 air is contained in a room, find the length , breadth and h
    14·1 answer
  • After inserting a video into your slide how can you test it
    11·1 answer
  • When is it appropriate to utilize the nat network connection type?
    8·1 answer
  • What is it called when you define a variable for the first time
    12·2 answers
  • Hypertext enables you to navigate through pieces of information by clicking the __________, that connect them.
    8·1 answer
  • Suppose a computer's login mechanism first asks for a user name, and then for the password, regardless of whether or not the log
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!