Ya sorry abt that my algo is wrong!
On Tue, Jul 19, 2011 at 3:35 PM, Bhanu Kishore wrote:
> @Venkat. That algorithm doesnt work actually.Try for 9,8,1. At 1 , it
> becomes 0.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post t
@Dumanshu:
i know you have given a good explanation but i have never done
parallel computing..
could you illustrate a bit more especially about the n+1th process..
On Tue, Jul 19, 2011 at 3:35 PM, Bhanu Kishore wrote:
> @Venkat. That algorithm doesnt work actually.Try for 9,8,1. At 1 , it
> becom
@Venkat. That algorithm doesnt work actually.Try for 9,8,1. At 1 , it
becomes 0.
--
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
a
doing xor of all elements in array[][] should work. you start from a[0]
[0] to a[0][n] then a[1][0] .. when the xor value bcomz 0 then the
corresponding value in arr[i][j] is the first repeated element in the
array. though this code will have two loops and seem as O(n2) it will
terminate once it fi
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