Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
Define what an inversion is in a list.
Think about the order of elements in an array.
What does the divide and conquer method entail?
Remember the steps of the algorithm.
What is an inversion in a sequence?
Think about how we define ordering in a list.
True or False: A divide and conquer strategy can be used to count inversions efficiently.
Recall the efficiency compared to a brute force method.
Determine the number of inversions for the following array: [2, 3, 8, 6, 1]. Explain the process you used.
List pairs in order and check their indices.
Consider two rankings, A = [3, 1, 2] and B = [1, 3, 2]. Calculate the number of inversions and describe how you derived the count.
Focus on how elements are ranked in both A and B.
4 more questions in this section. Enroll free to practise them all.
Enroll free