student Interview Question for Students
- 0of 0 votes
Given an array A storing n elements and a parameter k which is a positive integer, an element of A- gaurav August 21, 2012 in India
is said to be k-majority of A if it appears more than
times in A. Design an algorithm which computes
a k-majority element, if exists, in array A. The algorithm must have O(nk) time complexity.
| Report Duplicate | Flag | PURGE
Open Chat in New Window