1 Enum <E extends Enum <E> class
This is a common basic class for all Java language enumeration types.
2. Common sorting algorithms
- Bubble Method. Simple. This method can be used for small demands.
- Fast sorting. Determine the keyword and divide the data into two parts: less than and greater than the keyword. Then recursively arrange the two parts.
- Insert sorting. Data is divided into two parts: ordered and unordered. the unordered parts are traversed one by one, and records are inserted into ordered parts one by one. There is an improved semi-insertion sorting, that is, the insertion position is confirmed by binary search during insertion.
- Hill sorting. Groups data intervals and inserts and sorts data in the group. The interval is gradually decreased until it is 1.
- Select sort. Divide the data into two parts: ordered and unordered, traverse the unordered part, locate the smallest (or largest) element, and insert it to the end of the ordered part.
- Heap sorting. Construct a binary heap.
- Merge and sort. The two ordered data can be merged into an ordered data by means of merging and sorting. Therefore, we can manually divide the data to be sorted into two parts, and then merge and sort the data. Of course, each part requires recursive calling of Merge Sorting.