There are countless problems in computing, but only a few fields have caused special attention. The following describes the types of important issues.
1. Sort
Sorting ProblemsWe are required to rearrange the data items in the given list in ascending order (in descending order. When sorting records, you must select a piece of information as the basis for sorting.
Key. The sorting algorithm has two features: stable (
The relative position of the equal element in the input is retained.), In-place (
No additional memory or constant memory occupied). Stable Sorting Algorithm:
Bubble sorting, insert sorting, Merge Sorting, and base sortingNon-stable sorting algorithms: Select sorting, fast sorting, Hill sorting, and heap sorting In-place sort:
Insert sorting, select sorting, Bubble sorting, heap sorting, and quick sortingOut-place sort:
Merge Sorting, Count sorting, base sorting, and bucket sorting2. Search
The query problem is to find a given value in a given set (or multiple duplicate sets that allow multiple elements to have the same value.
Generally, you need to consider the following two operations: Adding and deleting elements in a dataset. In this case, you must carefully select the data structure and algorithm to find a balance between the needs of various operations.
Common search methods in Section 5: sequential search, binary search (half-fold search), binary search, hash table (hash list), and segmented search.
3. the string processing string is a sequence consisting of symbols in the alphabet. Finding a given word in the text is called a string matching problem. Three algorithms for String Matching:
Supports brute force string matching, Horspool algorithm, and Boyer-Moore algorithm.
4. Graph problems basic graph algorithms include graph Traversal Algorithms (
Depth-first algorithm and breadth-first algorithm), Shortest path algorithm (
Dijkstra Algorithm) And the topological sorting of Directed Graphs. Classic problems in graph problems:
Traveling Salesman Problem and graphic coloring problem. 5. The combination problem is the most difficult problem in the computing field. 6. Geometric Problem Geometric algorithms process geometric objects similar to points, lines, and polygons. Two typical computational geometric problems:
Recently, we have been dealing with problems and convex hull issues.7. Numerical problems numerical problems involve continuous mathematical problems, such as solving equations and equations, calculating definite points, and obtaining function values.