Ezvor

1538. Guess the Majority in a Hidden Array

MediumArray Preparing judge… LeetCode
ArrayMathInteractiveBoyer–Moore Majority Vote Algorithm

Hints

Hint 1
If you find that 2 indexes in the array (id1, id2) have the same value (nums [id1] == nums [id2]), you could infer the values of (x, y) based on the results of query (id1, id2, x, y).