Friday, 2 September 2016

Arrays Questions set

Array
Data Structures 15CS33


1.      For a given sparse matrix and its transpose, give the triplet represntation using one dimensional array, a is the given sparse matrix, b will be its transpose.

             

(December 2011)
(Dec 2013)
(December 2015)
(June 2015)
(8 marks)

2.      Consider two polynomials A(x) = 2x100 +  1 and B(x) = x4 + 10x3 + 3x2 + 1, show diagrammatically , how these two polynomials can be stored in single 1D array. Also give its C representation.
(December 2011)
(June 2015)
(12 marks)

3.      Give ADT Sparse matrix and show with a suitable example sparse matrix representation storing as triples. Give search function to search for a key in triples and Give simple transpose function to transpose sparse matrix.
(June 2013)
(8 marks)

4.      How would you represent two sparse polynomials using array of structures and also write a function to add that polynomial and store the result in the same array.
(June 2013)
(December 2015)
(6 marks)

5.      What is polynomial? What is the degree of the polynomial? Write a function to add two polynomails.
(December 2013 )
(June 2015)
(8 marks)

6.      Explain with example, dynamic memory allocation for 2 D arrays.
(June 2014)
(4 marks)

7.      Write the fast transpose algorithm for sparse matrix. Why the name sparse matrix?
(June 2014)
(8 marks)

8.      Write a note on dynamically allocated arrays using example.
(December 2015)

(6 marks)