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
Information goes into a computer through _______ and comes our through _______
vaieri [72.5K]
Imformation goes into a computer through wires and comes out through data/gigabites. Or when you print it.
5 0
3 years ago
Read 2 more answers
What part of the code is a signal for the function to execute and pass back a value?
Trava [24]

Answer:

2

Explanation:

6 0
3 years ago
Read 2 more answers
Two boxes overlap if their interiors have at least one point in common. Give an O(n log n)-time algorithm that decides if there
GaryK [48]

Answer:

// Program is written in C++ programming language

// The program checks if two boxes overlap and prints both boxes

// Comments are used for explanatory purpose

// Program starts here

#include<bits/stdc++.h>

#include <graphics.h>

#include <conio.h>

// Define x and y axis

struct axis { int x, y; };

bool checkRect(Axis l1, Axis r1, Axis l2, Axis r2)

{ // l1, l2, r1 and r2 represent the left and right coordinates of both rectangles

// Check one rectangle is on left side of other

if (l1.x > r2.x || l2.x > r1.x) {

return false; }

// Check if one rectangle is above other

if (l1.y < r2.y || l2.y < r1.y) {

return false; }

return true;

}

// Main Method begins here

int main()

{

// Declare integer variables to enter rectangle coordinates

// For rectangle 1

int left1, left2, right1, right2;

cout<<"Enter First rectangle coordinates: "<<"\n";

cout<<"Top Left: "<<"\n";

cin>>left1;

cout<<"Bottom Left: "<<"\n";

cin>>left2;

cout<<"Top Right: "<<"\n";

cin>>right1;

cout<<"Bottom Right: "<<"\n";

cin>>right2;

// For rectangle 2

int left3, left4, right3, right4;

cout<<"Enter Second rectangle coordinates: "<<"\n";

cout<<"Top Left: "<<"\n";

cin>>left3;

cout<<"Bottom Left: "<<"\n";

cin>>left4;

cout<<"Top Right: "<<"\n";

cin>>right3;

cout<<"Bottom Right: "<<"\n";

cin>>right4;

Axis l1 = {left1, left2}, r1 = {right1, right2};

Axis l2 = {left3, left4}, r2 = {right3, right4};

if (checkRect(l1, r1, l2, r2)) {

cout<<"The Rectangles Overlap"; }

else {

cout<<"Rectangles Don't Overlap";}

// Print Rectangle 1

rectangle (left1, right1, left2, right2);

// Print Rectangle 2

rectangle (left3, right3, left4, right4);

return 0;

}

5 0
3 years ago
In order to organize your work effectively on the computer, where is the best place to save it?
Morgarella [4.7K]
Your answer is -

B. Folder Is the best place to save it
8 0
3 years ago
Read 2 more answers
Heavy use of computers, combined with information overload and 24/7 accessibility via technology, can lead to
STatiana [176]
Things! :D :D :D :D :D
5 0
3 years ago
Other questions:
  • 7. Which innovation in video games do you think has been most significant? Include at least one way that innovation affects the
    6·1 answer
  • The RESET circuit used on the four 3-Bit Counters analyzed in this activity reset the counts to zero (000). It makes sense for t
    14·1 answer
  • Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one.
    11·1 answer
  • Select the correct answer.
    8·2 answers
  • Should the existing system be replaced?This is a question that is asked during the _____ stage of the Systems Development Life C
    8·1 answer
  • What does remedy mean
    7·2 answers
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • Give four advantages for ssd compared to hdd
    15·2 answers
  • Suppose you want to boot a VM from its virtual DVD drive, but it boots to the VM’s hard drive. Which of the following could be t
    12·1 answer
  • Most of the internal operations in a computer use hexagonal numbering true or false
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!