For which of the following programming tasks is recursion most suitable? Dividing a word list into two equal sublists, sorting, then repeatedly dividing and sorting in this way until the entire list is sorted Generating a list of anagrams from a word, then sorting them repeatedly Inserting a word at a specified location within a list, repeating this process with every specified word until complete Searching for a word within a large set of documents, commenting the word, then repeating
Recall in the question we tackled yesterday that recursion is suitable for problems that can be solved by breaking large problems into smaller, easily solvable problems. Out of the four options presented, one of them seems to involve breaking down (or "dividing") a large problem into various steps of smaller and smaller problems to make the original large problem easier to solve. Can you see which one that is?
Yeah, I think that would fit pretty well with the usual use of recursive recursion. So, that seems like a good answer choice :)
Ok thanks for the help
Join our real-time social learning platform and learn together with your friends!