answer.
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
Taya2010 [7]
2 years ago
8

Suppose that you need to maintain a collection of data whose contents are fixed- i.e., you need to search for and retrieve exist

ing items, but never need to add or delete items. Although the collection of data may be quite large, you may assume that it can fit in the computer's memory. Which of the following data structures is the most efficient one to use for this task?
a. a sorted array
b. a linked list
c. a binary search tree
d. a queue
e. they are all the same
Computers and Technology
1 answer:
Keith_Richards [23]2 years ago
4 0

Answer:

Option a: a sorted array

Explanation:

Since the expectation on the data structure never need to add or delete items, a sorted array is the most desirable option. An array is known for its difficulty to modify the size (either by adding item or removing item). However, this disadvantage would no longer be a concern for this task. This is also the reason, linked list, binary search tree and queue is not a better option here although they offer much greater efficiency to add and remove item from collection.

On another hand,  any existing items from the sorted array can be easily retrieved using address indexing and therefore the data query process can be very fast and efficient.

You might be interested in
Which group contains the command to manually conduct a spell check ?
charle [14.2K]

Answer:To check spelling in a Word document, open up the document, head to the “Review” tab, then click on “Spelling & Grammar” (part of the “Proofing” group of tools). Then a window will appear showing the first word the program believes to be misspelled. Click through the options to review the whole document.

Explanation:Hope this helped u out btw can i plz have brainlist only if u wanna give me brainlist though have an great day kind sir or ma'am!

8 0
1 year ago
You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
Slav-nsk [51]

Answer:

The code to this question can be given as:

Code:

int i,j,count_previous=0,count_next=0; //define variable

for (j=0; j<n; j++) //loop for array

{

if (x[0]==x[j]) //check condition

{

count_previous++; //increment value by 1.

}

}

for (i=0; i<n; i++) //loop

{

for (j=0; j<n; j++)

{

if (x[i]==x[j]) //check condition

{

count_next++; //increment value by 1.

}

}

if (count_previous>count_next) //check condition

{

mode=x[i-1];

}

else

{

mode=x[i];

count_previous=count_next; //change value.

count_next= 0 ; //assign value.

}

}

Explanation:

In the question it is define that x is array of the string elements that is already define in the question so the code for perform operation in the array is given above. In the code firstly we define the variable that is i, j, count_previous, count_next. The variable i,j is used in the loop and variable count_previous and count_next we assign value 0 that is used for check the values of array. Then we define the for loop in this loop we use conditional statement in the if block we check that array of zero element is equal to array of j value then the count_previous is increase by 1. Then we use nested loop It is also known as loop in a loop. In this first loop is used for array and the second loop is used for check array element.In this we use the condition that if array x of i value is equal to array x of j then count_next will increment by 1.Then we use another condition that is if count_previous is greater then count_next then mode of x is decrement by 1. else mode equal to array and count_previous holds the value of count_next and count_next is equal to 0.

8 0
1 year ago
What is the formula equivalent to the function =SUM(B1:B5)?
posledela
You have the correct answer selected!
6 0
2 years ago
Read 2 more answers
A(n) _____ is the highest educational degree available at a community college. master bachelor associate specialist
baherus [9]
<span>An associate's degree requires two years of academic study and is the highest degree available at a community college</span>
5 0
2 years ago
Read 2 more answers
Shirley was unsure about what career to go into. Her high school counselor suggested a personal assessment to point out Shirley’
Alex73 [517]
<span>I think that she would be well suited in going into law enforcement or fire fighting. Since she loves to stay active and is cool under pressure, both of those jobs would be very well suited for her personality. Those 2 jobs demand to stay cool into delicate situations. Also, she would be able to come in to help people in need.</span>
4 0
1 year ago
Read 2 more answers
Other questions:
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    9·2 answers
  • Rob creates a Course_Details table that has four columns: Course _ID, Course_Name, Semester and Credits. A course may have 0.5 c
    6·2 answers
  • Consider the following relationship involving two entities, students and classes:A student can take many classes. A class can be
    9·1 answer
  • Identify the articulation site that allows us to nod our head ""yes"".
    13·1 answer
  • Assume that machines A and B are on the same network 10.3.2.0/24. Machine A sends out spoofed packets, and Machine B tries to sn
    14·1 answer
  • Cloud storage refers to the storage of data on ______.a. your mobile device.b. your desktop computer.c. an external drive.d. a s
    7·1 answer
  • Dante has a worksheet shared with multiple users. He would like the ability to approve or reject changes that are made. Which fe
    12·1 answer
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
  • Checkpoint 10.43 Write an interface named Nameable that specifies the following methods: _______{ public void setName(String n)
    12·1 answer
  • Prompt
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!