Data Structure tutorial (Java description) edited by Xu xiaokai-review abstract 03

Source: Internet
Author: User
 
 

 

Data Structure tutorial (Java description) edited by Xu xiaokai-review abstract 03

Chapter 1 linear table

Sequential storage and operation implementation of linear tables

Public class sequencelist implements list {final int maxsize = 10; // array initial length private object [] listarray; // array declaration, element type: objectprivate int length; // current length of the linear table // Operation Public sequencelist () {} public sequencelist (int n) {} public object value (int pos ){}...}

Definition of sequential storage of ordered linear tables

public class seqSortedList extends sequenceList implements SortedList{public seqSortedList(){}public seqSortedList(int n){}public seqSortedList(sequenceList list){}public void insert(Object obj){}public Object delete(Object obj){}public int check(Object obj){}}

Data Link storage is also called a chain table. When each node in a chain table contains only one pointer field, it is called a single-chain table. Otherwise, it is called a multi-chain table.

Linear table link storage and operation implementation

Public class linklist implements list {private node head; // header pointer private int length; // The current length of a linear table (single-chain table) Public linklist () {} public object value (int pos ){}...}

Sequential linear table connection storage and operation implementation

public class linkSortedList extends linkList implements SortedList{public linkSortedList(){}public linkSortedList(linkList list){}public void insert(Object obj){}public Object delete(Object obj){}public int check(Object obj){}}

Expression and Evaluation of Polynomials

1. Only linear representation and evaluation of each coefficient in the polynomial are saved.

2. Save the linear representation and evaluation of each coefficient and exponent in the polynomial

Triplet linear representation of Sparse Matrix

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.