Chapter 5. Searching and Sorting
- IntroductionRecipe 5.1.
Sorting a DictionaryRecipe 5.2.
Sorting a List of Strings Case-InsensitivelyRecipe 5.3.
Sorting a List of Objects by an Attribute of the ObjectsRecipe 5.4.
Sorting Keys or Indices Basedon the Corresponding ValuesRecipe 5.5.
Sorting Strings with Embedded NumbersRecipe 5.6.
Processing All of a List's Items in Random OrderRecipe 5.7.
Keeping a Sequence Ordered as Items Are AddedRecipe 5.8.
Getting the First Few Smallest Items of a SequenceRecipe 5.9.
Looking for Items in a Sorted SequenceRecipe 5.10.
Selecting the nth Smallest Element of a SequenceRecipe 5.11.
Showing off quicksort in Three LinesRecipe 5.12.
Performing Frequent Membership Tests on a SequenceRecipe 5.13.
Finding SubsequencesRecipe 5.14.
Enriching the Dictionary Type with Ratings FunctionalityRecipe 5.15.
Sorting Names and Separating Them by Initials