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
bonufazy [111]
4 years ago
7

Contrast and compare: an array, a stack, and a queue. Identify the principal uses of each and give an example.

Computers and Technology
1 answer:
Soloha48 [4]4 years ago
8 0

Answer:

All three of them are linear Data Structures.

A stack is a FILO(First In Last Out) or LIFO(Last In First Out)  type data structure means first inserted element will be the last one to be removed form the stack.Insertion and Deletion is from one end only called head.

ex:-A stack of books on the shelf.

A queue is FIFO(First In First Out) type means the first inserted element will be the first one to be removed.In queue insertion is from the back or tail and removal of elements is done form the front.

ex:-A queue at the ticket counter.

In array each element stored is given an index, by which we can be access the element very easily. We can use this index to modify or store element at that index of the array. i.e any object can be accessed with the right index, unlike queue and stack.

We can access only the front and back in the queue.In stack we can access only the top but in array we can access any element with the index.

You might be interested in
What is the definition of digital literacy?
babunello [35]
Digital literacy is part of media literacy,Both include the idea of info literacy,Which is the ability to effectively find, Identify, Evaluate,And use info., Digital literacy especially applies to media from the internet, Smartphone,Video games,And other things us teens use now & days....Hope that helps (Also next time up your points if you want more Answers) (:
4 0
3 years ago
Read 2 more answers
I have this questions i need to make it in a report format pages of atleast 3 pages and maximum of 5 pages​
Nuetrik [128]

First write what is software take one page for that

and each page for all other topics

6 0
3 years ago
Please respond not with answer but with comment.
aksik [14]

Answer:.I used to play it but now I don’t;—;

Explanation:

4 0
3 years ago
Write a C++ program to count even and odd numbers in array. The array size is 50. The array elements will be entered by the user
vlabodo [156]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

int main(){

   int numbers[50];

   int evekount = 0, odkount = 0;

   for(int i = 0; i<50;i++){

       cin>>numbers[i];

       if(numbers[i]%2==0){            evekount++;        }

       else{            odkount++;        }

   }

   cout<<"Even Count: "<<evekount<<endl;

   cout<<"Odd Count: "<<odkount<<endl;

   return 0;

}

Explanation:

This declares the integer array of number

   int numbers[50];

This initializes the even count and odd count to 0

   int evekount = 0, odkount = 0;

This iterates from 1 to 50

   for(int i = 0; i<50;i++){

This gets input for the array

       cin>>numbers[i];

This checks for even

<em>        if(numbers[i]%2==0){            evekount++;        }</em>

This checks for odd

<em>        else{            odkount++;        }</em>

   }

This prints the even count

   cout<<"Even Count: "<<evekount<<endl;

This prints the odd count

   cout<<"Odd Count: "<<odkount<<endl;

3 0
3 years ago
You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experime
murzikaleks [220]

Answer:

Explanation:

Attached is the solution

3 0
3 years ago
Other questions:
  • ________ is a software that interprets java bytecode.
    12·1 answer
  • Write the execution steps if the input is a lion.
    11·1 answer
  • Which reading strategy refers to reading only the key words and phrases?
    13·2 answers
  • When projecting a presentation on a large screen, what should your minimum font size be?
    6·2 answers
  • Which procedure is used as a physical barrier to secure data against unauthorized access in a cloud storage data center?
    6·1 answer
  • You might have trouble interpreting a message if:
    15·1 answer
  • How would you describe the relationship between blocks of code and commands?<br>HELP​
    10·1 answer
  • A photographer uses which of these tools to form an argument?
    14·2 answers
  • Write a program that takes the account's present value, monthly interest rate, and the number of months that the money will be l
    5·1 answer
  • Select the correct answer.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!