InterviewSolution
Saved Bookmarks
| 1. |
You are given an array A[] having n random bits and a function OR(i,j) which will take two indexes from an array as parameters and will return the result of ( A[i] OR A[j] ) i.e bitwise OR. What is the minimum no of OR calls required so as to determine all the bits inside the array i.e. to determine every index of A[] whether it has 0 or 1 ?(A) N-1(B) N*(N-1)/2(C) N(D) Not possible to determine the bit array |
| Answer» | |