Could someone explain this question to me.It’s Confusing,
QUESTION
- Given two lists, sort the values of the first list using the second list.
Examples:
Input : list_1 = [“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”]
list_2 = [ 0, 1, 1, 0, 1, 2, 2, 0, 1]
Output :[‘a’, ‘d’, ‘h’, ‘b’, ‘c’, ‘e’, ‘i’, ‘f’, ‘g’]
Input : list_1 = [“g”, “e”, “e”, “k”, “s”, “f”, “o”, “r”, “g”, “e”, “e”, “k”, “s”]
list_2 = [ 0, 1, 1, 0, 1, 2, 2, 0, 1]
Output : [‘g’, ‘k’, ‘r’, ‘e’, ‘e’, ‘g’, ‘s’, ‘f’, ‘o’]