Counting complement pairs
In the array [2, 4, 3, 5, 6, 4, 1, 7], how many unordered pairs of distinct positions with have ?
Show hints (2)+
- For each element, count how many earlier elements equal its complement .
- Watch the two 4s: they form a valid pair since they sit at different positions.
Answer
Reveal answer →Final answer
4
Want the full step-by-step worked solution? It's part of Premium - along with a worked solution for every question in the bank.
Asked at: Probability & Market-Making, Data-Driven Research