Collections is a collection of tool classes that define a number of static methods
BinarySearch (List,object) uses dichotomy to find the element in the collection, returns the subscript of the element in the collection if found, and returns a negative number if it is not found
Copy (list,list) copies all the elements from one collection to another.
Disjoint (collection,collection) two sets if none of the same elements returns true
Min,max (Collection) finds the smallest and largest element in the collection, and the rule is implemented by implementing the CompareTo method in the comparable interface
The reverse (list) reverses the order of the elements in the specified list.
Swap (List,int,int) swaps the elements at the specified list location.
Sort (List) sorts the specified collection, and the rules for sorting are implemented by implementing the CompareTo method in the comparable interface
The rotate (list,int) element is rotated clockwise, and the second parameter is the distance of the rotation
EQ:[A,B,C] rotate1 distance-->[c,a,b]
For comparison of Chinese strings:
The comparison size of the Chinese string is by word comparison, take out each character according to the code to find the corresponding number of characters, and then compare the size of the code number, the empty string is the smallest.
Collection of Tool classes collections