10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

Void Store(i, float x);<br />

else return error<br />

// if (i in index) insert the new pair <br />

};//end of GeneralArray<br />

else return error.<br />

The Polynomial Abstract <strong>Data</strong> Type<br />

Examples of polynomials<br />

( )<br />

( )<br />

Ax = 3x+ 2x+ 4<br />

Bx = x + 10x + 3x + 1<br />

Sum and product of polynomials<br />

– Let A(x)= aix i and B(x)= bix i<br />

– Sum<br />

A(x)+ B(x)= (ai + bi)x i<br />

– Product<br />

The Sparse Matrix Abstract <strong>Data</strong> Type<br />

Matrix<br />

20 5<br />

4 3 2<br />

A(x)*B(x)= (aix i * (bjx j ))<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 57 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!