Question 1
Study the pattern:
Input: elephant cat dog ant
Output: ant cat dog elephant
Now, what will be the output for:
Input: to a hi hello
The machine applies 'length_sort' rule.
to a hi hello → a to hi hello
to a hi hello → a to hi hello