Example 4: Ordering by word length
Last Updated On: Sun Sep 06 2026Given Data
- Input: river, sun, mountain, tree.
- Step I: sun, river, mountain, tree.
- Step II: sun, tree, river, mountain.
Question
What rule is the machine using?
Answer
It places words in increasing order of length.
Solution
- Sun has 3 letters and moves first.
- Tree has 4 letters and moves second.
- River has 5 letters and mountain has 8 letters, confirming increasing word length.