Java Data Structure Brief

Source: Internet
Author: User

1. Arrays

Concept: A linear collection of stored elements.

Array Declaration and creation:

new datatype[arraysize];

Two-dimensional array (multidimensional array) Declaration and creation:

new datatype[arraylenght1][arraylenght2];

PS: The array length must now be determined.

2. List

Concept: A list is an ordered set of data.

Common implementation: ArrayList, LinkedList.

3, Stack

Concept: A stack is a post-in, first-out data structure.

Common implementation: Stack (Java.util.Stack).

4. Queue

Concept: A queue is an FIFO data structure.

Common implementations: LinkedList.

6. Linked List

Concept: A linked list is a collection of nodes that are made up of a group. Each node uses a reference to an object to point to its successor. A reference to another node is called a chain.

Linked list type:

1. Basic Chain List

2. Doubly linked list (add a property to store a reference to the predecessor node)

3. Circular link list (tail node pointing to head node)

7. Dictionaries

Concept: A data structure stored as a key-value pair.

Common implementations: Dictionary, Map.

8. Hash

Concept: Hash tables (hash table, also called hash table), are data structures that are accessed directly based on key value. It maps the key values to a location in the table to record the data, which is called a hash function, and the array that holds the record is called the hash list.

9. Tree

Concept: A tree consists of a group of nodes connected by a set of edges, the root node has no parent node, and the child nodes are not connected.

Common trees: Two fork tree, binary search tree.

10. Figure

Concept: A graph consists of a set of edges and a set of vertices. If the vertex pairs of a graph are ordered, it is called a forward graph, and if the graph is unordered, it is called an unordered graph.

Java Data Structure Brief

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.