Input Output Question
Question 70
VerifiedA word arrangement machine, when given an input line of words, rearranges them step by step. In each step, the word that comes first in dictionary order among the words not yet arranged is moved to the position just after the words already arranged; the other words shift one place to the right, keeping their order. The machine stops as soon as all words are in dictionary order.
Illustration:
Input: storm brings heavy rain over coast
Step I: brings storm heavy rain over coast
Step II: brings coast storm heavy rain over
Step III: brings coast heavy storm rain over
Step IV: brings coast heavy over storm rain
Step V: brings coast heavy over rain storm
(Step V is the last step.)
Input: tiny seeds grow into mighty forests
Which step will read 'forests grow into tiny seeds mighty'?
Illustration:
Input: storm brings heavy rain over coast
Step I: brings storm heavy rain over coast
Step II: brings coast storm heavy rain over
Step III: brings coast heavy storm rain over
Step IV: brings coast heavy over storm rain
Step V: brings coast heavy over rain storm
(Step V is the last step.)
Input: tiny seeds grow into mighty forests
Which step will read 'forests grow into tiny seeds mighty'?
- AI
- BII
- CIII
- DIV
- EV
Solution
Rav Singh AI · online
Hi! I am Rav Singh AI. For Q70, what do you want?
Answer key & full solution as text
Answer: (C) III
🔓 Full solution is free for Cetking students.