Data Structure Summary

data structure

Definition: It is the way a computer stores and organizes data; it refers to a collection of data elements that have one or more specific relationships with each other.

 

operate:

  store data

  get data

  change the data

  delete data

  number of data [length]

 

 

Commonly used structures in Java : arrays, linked lists, stacks, queues ...

Array: In program design, several variables with the same type are organized in an orderly form for the convenience of processing. Is an ordered collection of homogeneous data elements.

Keywords: linear, type fixed, memory address contiguous, fixed length

create: classname/datatype  []  arrayname  = new classname/datatype [ array length ]; 

 

 

Linked list: It is a non-consecutive, non-sequential storage structure on a physical storage unit.

Keywords: linear, variable length, non-consecutive memory addresses

 

Stack: A special linear list that can only be inserted and deleted at one end.

Keywords: linear, variable length, last in first out [LIFO]

 

Queue: A special linear table that only allows delete operations at the front end of the table and insert operations at the back end of the table.

Keywords: linear, variable length, first in first out [FIFO] 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326456846&siteId=291194637