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
Delvig [45]
3 years ago
11

What are the pros and cons of using a linked implementation of a sparse matrix, as opposed to an array-based implementation?

Computers and Technology
1 answer:
otez555 [7]3 years ago
6 0

Answer:

Linked lists and arrays are both linear data structures but while an array is a collection of items that can be accessed randomly, a linked list can be accessed sequentially.

A sparse matrix contains very few non-zero elements. For example;

_                        _

|  0   0   3  0  6    |

|   0   5   0  0  4   |

|   2   0   0  0  0   |

|_ 0   0   0  0  0 _|

In the implementation of a sparse matrix, the following are some of the pros and cons of using a linked list over an array;

<em>PROS</em>

i.  Linked lists are dynamic in nature and are readily flexible - they can expand and contract without having to allocate and/or de-allocated memory compared to an array where an initial size might need to be set and controlled almost manually. This makes it easy to store and remove elements from the sparse matrix.

ii. No memory wastage. Since the size of a linked list can grow or shrink at run time, there's no memory wastage as it adjusts depending on the number of items it wants to store. This is in contrast with arrays where you might have unallocated slots. Also, because the zeros of the sparse matrix need not be stored when using linked lists, memory is greatly conserved.

<em>CONS</em>

i. One of the biggest cons of linked lists is the difficulty in traversing items. With arrays, this is just of an order of 0(1) since the only requirement is the index of the item. With linked lists, traversal is sequential which means slow access time.

ii. Storage is another bottle neck when using linked lists in sparse matrix implementation. Each node item in a linked list contains other information that needs to be stored alongside the value such as the pointer to the next or previous item.

You might be interested in
You want to find the distance between two points.
maks197457 [2]

Answer:

For the first picture, choose the second pair, and for the second one, choose the first pair

Explanation:

5 0
3 years ago
Which of the following is an example of constructive criticism for a friend who speaks too softly?
Dmitry [639]
C is correct..

Please vote my answer branliest! Thanks.
8 0
3 years ago
Read 2 more answers
You received an email from someone who claims to be a representative from your school. The email asked you to click on a link to
Sergeeva-Olga [200]

Answer:

Phishing

Explanation:

Phishing = Link to a site, usually a fake replica of a legitimate site but with added implements that can be used to spy on you (how people become victims of identity theft

6 0
3 years ago
output device is any peripheral to provide data and control signal to ab information processing system​
nirvana33 [79]

Answer:

Its false ita not "output" its "input"

7 0
2 years ago
Asymmetric key encryption combined with the information provided by a. certificate authority allows unique identification of the
Nesterboy [21]

Answer:

c. both the user and the provider of encrypted data.

Explanation:

In assymetric key encryption, you will need the public key of the sender to decode the information along with your private key to decode the encrypted information. if you don't have any of the keys, you won't be able to read the information. You must have both in order to read the information sent.

5 0
2 years ago
Other questions:
  • What is a block cipher algorithm that operates on 64-bit blocks and can have a key length from 32 to 448 bits?
    8·1 answer
  • When creating a spreadsheet, there's no need to worry about design and how it will be organized; the program will take care of t
    11·2 answers
  • Which ipv6 prefix will the typical enterprise network receive from the service provider?
    12·1 answer
  • What permission do users have by default regarding printer access and the ability to manage documents?
    14·1 answer
  • History timeline: who developed what elements first Windows OS and Apple OS?
    13·2 answers
  • Consists of a variety of circuitry and components that are packaged together and connected directly to the motherboard. it perfo
    5·1 answer
  • A collection of wiress connecting the CPU with main memory that is used to identify particular location is called
    13·1 answer
  • Describe the scope of the variables in this code.
    8·2 answers
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • How much do you think it would cost to develop an app?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!