edited by
883 views
2 votes
2 votes
You have an array A with n JPEG images some of which are identical.

You can check if two objects are equal but you cannot compare them in any other way—i.e. you can check A[i] == A[j] and A[i] != A[j], but comparisons such as A[i] < A[j] are not meaningful.

The array A is said to have a majority element if strictly more than half of its elements are equal to each other.

Use divide and conquer to come up with an O(n logn ) algorithm to determine if A has a majority element.
edited by

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
2
A_i_$_h asked Jul 24, 2017
972 views
time complexity of multiplying two long integers of n - digits each using divide and conquer method isa)O(n^2)b)O(n)c)O(n^3)d)O(n logn)
0 votes
0 votes
1 answer
3