A programmer has two lists of random words, list1 and list2. He has written a program that is intended to create a list, finalList, of all the words found in list1 and list2 in alphabetical order with no repeated words. His program makes use of the following procedures:Alphabetize(list)Returns a list that contains the elements of list in alphabetical order.Join (list 1, list2)Returns a list with the elements of list1 followed by the elements of list2RemoveDuplicates (list)Returns a list with the same elements in the same order as list, but with any duplicate elements removed.The programmer's program is as follows:list1 ← RemoveDuplicates (list1)list2 ← RemoveDuplicates (list2)finalList ← Join (list1, list 2)finalList ← Alphabetize (finalList)What will be the contents of finalList after running this program?finalList, will contain all the words found in list1 and list2 with no repeated words, but these may not be in alphabetical order.As intended, finalList, will contain all the words found in list1 and list2 in alphabetical order with no repeated words.finalList, will contain all the words found in list1 and list2 in alphabetical order, but it may contain repeated words.finalList, will contain all the words found in list1 and list2 but they may not be in alphabetical order and also contain repeated words.

Respuesta :

Answer:

finalList, will contain all the words found in list1 and list2 in alphabetical order with no repeated words.

Explanation:

list1 ← RemoveDuplicates (list1)

list2 ← RemoveDuplicates (list2)

finalList ← Join (list1, list 2)

finalList ← Alphabetize (finalList)

The first step remove the duplicate in the list and returns the list to list1.

The next step does the same thing for list2.

The next step join list1 and list2 together and assign the new list finalList.

Lastly, the finalList will have its element in alphabetical order.