Ask Question
20 September, 08:50

Define an ADT for a two-dimensional array of integers. Specify precisely the basic operations that can be performed on such arrays. Next, imagine an application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. Describe two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions.

+5
Answers (1)
  1. 20 September, 12:01
    0
    ADT for an 2-D array:

    struct array{

    int arr[10];

    }arrmain[10];

    An application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. The two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions are:

    1) struct array{

    int * p;

    }arr[1000];

    2) struct array{

    int * p;

    }arr[1000];
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Define an ADT for a two-dimensional array of integers. Specify precisely the basic operations that can be performed on such arrays. Next, ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers