Algorithms for everyone to see

Source: Internet
Author: User
Tags greatest common divisor

1th Chapter what is an algorithm
Chapter 2nd Variables and Arrays
3rd Chapter Data Structure
The 4th chapter of Learning Algorithm Foundation
5th Chapter Sorting algorithm
6th Chapter Search Algorithm
The 7th chapter other algorithms
The 8th chapter algorithm and computer

1th Chapter what is an algorithm

1.1 algorithms are actually around.

The 1.2 algorithm is the crystallization of human wisdom.

1.3 Does understanding algorithms help with playing games?

1.4 Algorithms have two prerequisites

1.5 Important algorithms to know in particular

Topic 1 The idea of structured programming based on algorithm

Chapter 2nd Variables and Arrays

2.1 So-called "data", is a variety of information

2.2 There are different types of data

2.3 The most basic data is "value"

2.4 Box with "value" is called "variable"

2.5 to describe the algorithm, variables are indispensable

2.6 The so-called "substituting" refers to assigning data to variables

2.7 Different variables have different names

2.8 variable name to be able to interpret the data loaded by the variable

2.9 Assignment statements for substituting data into variables

2.10 Substituting the value stored in the variable for other variables

2.11 variables also have data types

2.12 "Arrays" that hold a large number of values of the same data type

2.13 array with "array name" tag

2.14 Elements of an array are managed with subscript

2.15 When do I need to use "arrays"?

2.16 "Array" is like a locker.

2.17 "Two-dimensional array" It's like a hotel room.

2.18 Each element of a two-dimensional array is managed with two subscripts

2.19 string is a continuous flattening (array) of characters

2.20 Two ways to get the length of a string

Topic 2 Common Variable naming

3rd Chapter Data Structure

3.1 For efficient processing of large amounts of data

3.2 Have those common data structures

3.3 "stacks" are similar to books stacked on the desktop

3.4 "Queue" is like a queue in front of a supermarket cashier.

3.5 "Linked list" is like a long string strung with ropes.

3.6 One-way linked list that can retrieve the next data only

3.7 A doubly linked list that can retrieve the previous or next data

3.8 The "array" that can locate the nth data quickly

3.9 can quickly insert, delete the data is "linked list"

3.10 Like a clock, the data is connected to the "ring buffer".

3.11 Manage the data of the tree trunks, branches, and leaves.

3.12 A parent node corresponding to two child nodes is a "binary tree"

3.13 A data structure composed of nodes and lines like strokes is "graph"

Topic 3 Why is the starting subscript of an array sometimes 0, and sometimes 1?

The 4th chapter of Learning Algorithm Foundation

4.1 Loop processing is the basis of the algorithm

4.2 Computes the sum of the integers of the 1~n

4.3 Use arrays to efficiently process large amounts of data

4.4 Calculate a year's turnover

4.5 The total and average score of the class test

4.6 Maximum Score

4.7 To find the lowest score

4.8 Ranking for exam results

4.9 Total score of different subjects in the class

4.10 Time difference in the form of "hours and seconds"

4.11 Tips for exchanging two variable values

4.12 Greatest common divisor of two values

Topic 4 2038 years to be mindful of

5th Chapter Sorting algorithm

5.1 Sorting refers to the order of multiple data permutations

5.2 About sorting algorithms

5.3 "Bucket sorting" with "cask" auxiliary

5.4 "Select Sort" to find a minimum (maximum) value at a time

5.5 "bubbling sort" for swapping adjacent data like bubbling

5.6 Insert Sort to insert the data in the correct position in the ordered data

5.7 merging several sequential data called "merging"

5.8 The algorithm for sorting using merge is called "merge sort"

5.9 Improved sorting efficiency for "hill sort"

5.10 Fastest Sorting algorithm "quick sort"

Topic 5 Write down the value of the n factorial of 2.

6th Chapter Search Algorithm

6.1 The so-called "search" is to find the target data from the data collection

6.2 Search by order from scratch is called "linear search"

6.3 "Two-point search" for high-speed search

6.4 Using hash tables for efficient search

6.5 "string Search" to search for a partial string in a string

6.6 KMP Algorithm for efficient search string

6.7 BM String Search algorithm for inverse comparison

Topic 6 Sorting and searching used in a relational database

The 7th chapter other algorithms

7.1 Using Newton method to solve equation

7.2 Solving equations by using Gaussian elimination element method

7.3 Trapezoid method for solving definite integral with trapezoid area

7.4 Eratosthenes sieve method for calculating prime numbers

7.5 Recursive functions that invoke itself at execution time

Topic 7 Algorithms and flowcharts

The 8th chapter algorithm and computer

8.1 Computer data is represented by a binary

8.2 Make binary numbers easier to read (octal, hex)

8.3 Binary conversion to decimal

8.4 Decimal conversion into binary

8.5 negative integers in binary notation

8.6 Logical OR: Any one is "1" then the result is "1"

8.7 Logic and: "1" is the result of "1"

8.8 "or not": "1" and "0" resulting in "1"

8.9 "negative": "1" becomes "0", "0" becomes "1"

8.10 using Demogan law to manage negative paradigms

Algorithms for everyone to see

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.