Description
This program illustrates the use of a key sorted bag. The program determines the number of words that have the same length in a phrase. It stores the words of the phrase in key sorted bag that it implements using the default class, IKeySortedBag. The program makes the key the length of the word. Because of the properties of a key sorted bag, it sorts the words by their length (the key), and it stores all duplicate words.
Concept
This program is a sample to demonstrate the use of the default class IKeySortedBag.
Task
This program uses a key sorted bag to store and sort words according to their length.