Input: sentence[]= {"red", "apple", "is", "the"}, dictionary[]= {"the", "apple", "is", "red"}
Output: 5
Explanation: In the comparison of the positions of each word in the two sentences, there are 5 pairs that are not in correct order. These are: ("red", "apple"), ("red", "is"), ("red", "the"), ("apple", "the"), and ("is", "the").
Input: sentence[] = {"sun", "the", "shining", "is", "bright", "today"}, dictionary[]= {"the", "sun", "is", "shining", "bright", "today"}
Output: 2
Explanation: In the comparison of the positions of each word in the sentences, there are 2 pairs that are not in correct order. These are: ("sun", "the") and ("shining", "is").