Ask Question
23 November, 11:41

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.

+1
Answers (1)
  1. 23 November, 12:10
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers