Purchase Solution

Matrices: Two-Dimensional Cartesian Structures

Not what you're looking for?

Ask Custom Question

One of the problems of storing data in a matrix (a two-dimensional Cartesian structure) is that if not all of the elements are used, there might be quite a waste of space. In order to handle this, we can use a construct called a "sparse matrix", where only the active elements appear. Each such element is accompanied by its two indexes (the row and the column). Discuss in what ways such a structure is similar to and/or different than a list.

Purchase this Solution

Solution Summary

This solution answers questions regarding data storage in a matrix.

Solution Preview

The structure of a sparse matrix can be defined as follows (using C/C++ syntax)
struct Sparse {
int element; // This is the content of the element
struct Sparse *nextRow; // A pointer to the next row element
struct Sparse *nextCol; // A pointer to the next column element
int row; // The index of row
int column; // The ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.

Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.