Google | Coding Round (GOCC) | July 2021
Google · Question · Posted Jul 2021
Summary 2 problems, 1 hour Almost all languages allowed Problem 1 You are given n numbers a1,a2...an . For every index i you are required to select aj(1 <= j <= n , i != j ) in such a way that there exists a non-negative integer x satisfying the following condition (a[i] | a[j]) + 1 = 2x where | denotes bitwise OR operation between a[i] and a[j]. Note If no such aj exists, print -1. If multiple answers ...
The full answer & interview discussion are available to premium members.
Log in Create a free account