Collect Job Search technical questions ②-Algorithms

Source: Internet
Author: User

Ability to design computer programs and master general algorithms, including but not limited to common sorting and searching, common string operations, dynamic planning, sub-governance, and greedy methods.

Sort:

As the name implies, files are arranged in ascending or descending order by certain keywords to form an orderly order.

Inner and outer rows: a small amount of data is sorted in memory. Exclusive refers to a large amount of data, involving the exchange of internal and external storage. (Mainly about internal ranking)

Stability: if multiple records with the same keywords exist, the order between these records remains unchanged after sorting, which is stable. (I have never understood it before, and it is not very clear now)

Classification: insert sorting, exchange sorting, select sorting, Merge Sorting, and distribution sorting (not used ).

Operation: There are no more than two types. One is to use if to compare the size of the keyword, and the other is to change or move the record (array subscript ).

Storage Method: There are two storage methods: sequence table or linked list. I use sequence table--, and the linked list in C # should point to quantity. It is mainly about reviewing the sorting ideas. Select only one type.

Performance: execution time, auxiliary space, and algorithm complexity.

For me, the sorting in the image has direct insert sorting, Hill sorting, see: http://www.cnblogs.com/kulong995/articles/1384228.html

Bubble sorting, fast sorting, see: http://www.cnblogs.com/kulong995/articles/1384948.html

Directly select sorting, heap sorting, see: http://www.cnblogs.com/kulong995/articles/1385635.html

Merge sort, see: http://www.cnblogs.com/kulong995/articles/1387251.html

There are also some interesting sorting types such as box sorting, bucket sorting, and base sorting, which have been in use and have not been written for the time being.

 

Search:

Data search is a basic computer programming task. The simplest idea is sequential search until it is found.

A little advanced point of half a look, see: http://www.cnblogs.com/kulong995/articles/1436658.html

Hash search, see http://www.cnblogs.com/kulong995/articles/1436667.html

 

String operation:

 

Dynamic Division:

 

Governance:

 

Greedy method:

 

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.