You have to use parallel computing to find the first repeating number
in O(n) time if theres nothing special about the 2-D array
Use n +1 processes, n processes to scan each row and 1 process to scan
the rows last and next rows first element to check for repetition.
Each process uses hash table to find the first non repeating number.
When we have the results from all the processes, do O(n) scanning, and
output the result for minimum row which wud be the first repetition.

On Jul 18, 10:42 pm, snehi jain <snehijai...@gmail.com> wrote:
> this question was asked in an interview.
>
> Regards
> Snehi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to