Java data structure and algorithm 1

Source: Internet
Author: User

Chapter 1 Overview

What is a data structure? Data with a certain organizational structure.

Why use the data structure? Improve program execution efficiency.

What is an algorithm? The process of executing a specific task.

Most algorithms are directly applied to a certain type of data structure. We need to know that the algorithms mainly include inserting new values, searching for given values and deleting given values, as well as iteration, sorting, and recursion.

Specific data structures include: group, ordered group, stack, team, linked list, binary tree, multi-tree, hash table, heap, and graph.

GROUP: Fast insert and value; Fixed Length of slow query and Deletion

Ordered Group: the search speed is higher than that of unordered groups. The slow length of insertion and deletion is fixed.

STACK: backward-forward, FIFO; slow Value

Team: FIFO; slow Value

Linked List: Fast insertion and deletion; slow Query

Binary Tree: Fast query, deletion, and insertion; complicated deletion Algorithms

Multi-tree: Fast query, deletion, and insertion, and complex tree-based storage Algorithms

Hash Table: Fast insertion if the key value is fixed; slow deletion if the key value is not fixed; memory consumption.

Heap: Fast insertion and deletion; slow Value

Figure: real-world models; some algorithms are complex and slow;

Object-Oriented programming ideology: Classes encapsulate data and methods, declare references, and generate objects, method providers, and users. Inheritance polymorphism.

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.