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
Which display technology was developed by apple, produces vibrant colors, and supports viewing from all angles?
Vedmedyk [2.9K]
4.5K Retina display I think that is the answer you’re looking for
3 0
2 years ago
Suppose a package pkg1 contains a class named MyClass and another package pkg2 contains a different class named MyClass. What ha
pogonyaev

Answer:

Following are the solution to this question:

Explanation:

In this question, two packages "pkg1 and pkg2" is defined, that hold a class that is "MyClass", in which the class name is the same. If we import the package so, it can't import both classes in the very same file. If we really need to apply to both, then must completely specify one class name, and in the class name is different so, we simply use both classes by creating the instance.  

7 0
3 years ago
How has 5G become more energy efficient?
photoshop1234 [79]

Option 4. The way that 5G is more efficient is that is is able to  utilize more energy efficient access points.

What is the 5G?

This is the term that is used to refer to the fifth generation mobile network. This is the latest generation of networks and it is known to be a faster way and a more efficient way of connecting to the internet when we compare it to the others that came before it.

This is known to have lower latency when we compare it to the 4G network. It is 100 times said to be faster than the 4G and more efficient for businesses and the people that use them. Hence the The way that 5G is more efficient is that is is able to  utilize more energy efficient access points.

Read more on 5G network here: brainly.com/question/24664177

#SPJ1

7 0
2 years ago
The __________ was the first all electronic computer.
spayn [35]

Answer:

its the ENIAC

4 0
3 years ago
PLEASE HELP
vitfil [10]

Answer:

1. I would ask her how big is her house, because when it’s big fiber optic cable is the best choice.

2. I would also ask her how loud is her house, as STP cable would be best choice.

Explanation:

Fiber optic cables have larger bandwidth than conventional metal cables. The amount of information transmitted per unit time using fiber over other transmission media is higher when compared to other alternatives. Power loss is minimal as this aid transmission over a long distance, this is why it is the best for big houses.

STP cables, are known for their better efficiency. But are expensive and hard to install, way stiffer and needs a lot of space.

5 0
3 years ago
Other questions:
  • Write a program using integers user_num and x as input, and output user_num divided by x three times. Ex: If the input is: 2000
    15·1 answer
  • You knew that you had to take this quiz so you logged into Blackboard and went to the quizzes section. In this scenario your com
    11·1 answer
  • Wrire a code that display elements at indices 1 and 4 in the follwoing array.
    12·1 answer
  • Websites whose URL’s contain tildes (~) are usually published by the government. TRUE or FALSE.
    8·2 answers
  • Name a device, app or website then give features of the app that make it addictive and humane. (3 details for each)
    5·1 answer
  • g (Locate the largest element) Write the following method that returns the location of the largest element in a two-dimensional
    11·1 answer
  • File compression is only available on hard-disk drives. <br><br><br> a. True <br><br><br> b. False
    6·1 answer
  • Someone pls help me with this question (Java)
    5·2 answers
  • Joining a computer to active directory involves joining the computer to a workgroup. True or false.
    10·1 answer
  • Java Provide the command to call the calcCirArea() function using a value of 15 for the circle’s radius and storing the result
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!