Google OA 2020 | India
Anonymous User
1073

Google campus internship OA test.
It was on HackerEarth.
2 questions 1 hour.

  1. Fairly easy one. Given an array, support the following functions - a) get index i , b) lef shift array c) right shift array d) increment value at an index e) update some index to val.

  2. Given array of size N<=20, divide array into N/2 pairs. For all posssible ways to divide the array, find the maximum and minimum sum of XOR of each pair.
    (Couldn't solve. HELP !) I tried putting them binary reps in a trie and then writing a recursive solution but was not sure.

Comments (2)