207k views
3 votes
A chef writing up her famed recipe for beef stew realizes she has switched parsley and oregano everywhere in the recipe. The chef wants to change all occurrences of “parsley" to “oregano" and all occurrences of “oregano" to “parsley." The chef will use the fact that the word “thyme" does not appear anywhere in the recipe. Which of the following algorithms can be used to fix the chef’s recipe? First, change all occurrences of “parsley" to “oregano." Then, change all occurrences of “oregano" to “parsley." First, change all occurrences of “parsley" to “oregano." Then, change all occurrences of “oregano" to “parsley." Last, change all occurrences of “thyme" to “oregano." First, change all occurrences of “parsley" to “thyme." Then, change all occurrences of “thyme" to “oregano." Last, change all occurrences of “oregano" to “parsley." First, change all occurrences of “parsley" to “thyme." Then, change all occurrences of “oregano" to “parsley." Last, change all occurrences of “thyme" to “oregano."

User Foxygen
by
8.3k points

1 Answer

1 vote

Answer:

the last three sentences

Step-by-step explanation:

first change all of the occurrences of parsley to thyme,

and then all of oregano to parsley

and then all of thyme to oregano

User Hamsternik
by
7.9k points