GOCC15: Google SWE Online Coding Challenge Internship 2021

I applied for the job, at Google’s Career Portal. There was a resume shortlisting round first. I received the link for the test 4 days prior to the test date. The test was conducted on the HackerEarth platform, there were 2 coding questions to be completed within 60min.

  1. The maximum XOR value: Given an array of N Integers. You are given q queries. Each query has 2 integers x and m. For each query, you are required to determine the array value that provides the maximum bitwise XOR value with x where the array value is not more than m.

    If there is no such value that satisfies then condition, then print -1.

    • Input Format: A first line is a number of test cases T. Each test case contain an integer N denoting the number of elements in the array. The second line of each test case contains array elements. The third line denoted the number of queries q. Next q lines contain two integers x and m.

    • Example:

      • Input:



        1
        7
        3 7 19 18 7 12 17
        7
        3 8
        21 20
        24 17
        1 7
        23 17
        12 9
        
      • Output:

        7
        12
        7
        7
        12
        3
        -1
        
  2. Divisibility Count: Find the number of N digit integers divisible by both X and Y, print answer modulo 10^9+7
    • Input Format: The first line contains T denoting the number of test cases. The first line of each test case contains 3 integers N, X, Y.

    • Output Format: Print an integer denoting the output.

    • Example:

      • Input:

        2
        2 5 7
        1 2 3
        
      • Output:

        2
        1
        

I could only clear a few test cases of both the questions. Hope this information helps.


Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.