Question 1
Study the pattern:
Input: cat dog bat ant
Output: ant bat cat dog
Now, what will be the output for:
Input: zebra apple mango grape
The machine applies 'alphabetical_sort' rule.
zebra apple mango grape → apple grape mango zebra
zebra apple mango grape → apple grape mango zebra