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

What are the benefits of using an ordered list vs. an unordered list? What are the costs?

Computers and Technology
1 answer:
Rashid [163]3 years ago
6 0

Answer:

The main benefit of the ordered list is that you can apply Binary Search( O( n log n) ) to search the elements. Instead of an unordered list, you need to go through the entire list to do the search( O(n) ).

The main cost of the ordered list is that every time you insert into a sorted list, you need to do comparisons to find where to place the element( O( n log n) ). But, every time you insert into an unsorted, you don't need to find where to place the element in the list ( O(1) ). Another cost for an ordered list is where you need to delete an element, you have an extra cost rearranging the list to maintain the order.

You might be interested in
If your network consists of all connected devices connecting to one central device, such as a switch, what type of topology is b
3241004551 [841]

Answer:

The correct answer to the given question is " Star Topology ".

Explanation

In the star topology, all the devices are connected to one central device in the network. It means every individual device is connected individually with the central device in the network.

The main drawback of star topology is that if the central device fails then all the device which are connected with them is also failed. The second drawback of star topology is to connect with the central device it requires more cabling.

8 0
3 years ago
What is Identity Theft?
olga55 [171]
A is correct! We did this in Law!

Have a merry Christmas!
5 0
3 years ago
in the world of computing accessibilty most often refers to: a how quickly software opens , b password protection, c assistance
Wittaler [7]
C. assistance for the disabled
8 0
3 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
Olin [163]

The following cose will be used to copy assignment operator for CarCounter

<u>Explanation:</u>

Complete Program:

#include <iostream>

using namespace std;

class CarCounter

{

public:

CarCounter();

CarCounter& operator=(const CarCounter& objToCopy);

void SetCarCount(const int setVal)

{

 carCount = setVal;

}

int GetCarCount() const

{

 return carCount;

}

private:

int carCount;

};

CarCounter::CarCounter()

{

carCount = 0;

return;

}

// FIXME write copy assignment operator

/* Your solution goes here */

CarCounter& CarCounter::operator=(const CarCounter& objToCopy)

{

if(this != &objToCopy)

 carCount = objToCopy.carCount;

return *this;

}

int main()

{

CarCounter frontParkingLot;

CarCounter backParkingLot;

frontParkingLot.SetCarCount(12);

backParkingLot = frontParkingLot;

cout << "Cars counted: " << backParkingLot.GetCarCount();

cout << endl << endl;

system("pause");

return 0;

}

5 0
3 years ago
​your business has a web server that has suddenly become unresponsive. when you study the server's logs there are a huge number
kvasek [131]
there's a chance the web server could quite possibly be backed up from all the requests and not being cleaned or updated often
8 0
3 years ago
Read 2 more answers
Other questions:
  • What are a few benefits of virtualization?<br> How do they benefit ?
    9·1 answer
  • If you are upgrading your operating system to Windows 7, you may not use the In-Place Upgrade Installation Option with
    14·1 answer
  • Please help me please and thank you!
    14·1 answer
  • You can change the transparency of a picture used as a slide’s background with the ____.
    10·1 answer
  • Which term means a device that converts one voltage to another?
    13·1 answer
  • Your sister asks you if it is possible to get an office productivity suite for free. What do you tell her?
    13·1 answer
  • A data center needs to ensure that data is not lost at the system level in the event of a blackout. Servers must stay operable f
    6·1 answer
  • Please help it’s timed
    13·1 answer
  • What Is The First Computer Brought In Nepal ? <br>​
    10·1 answer
  • Data becomes _______ when it is presented in a format that people can understand and use.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!