The Google online challenge 2020 for summer internships 2021 was held on Sept 26. It was a 60-minute online test having 2 questions to code.
First Question: You are given an array A with N integers. you are required to answer Q queries of the following types.
Determine the count of distinct prime numbers which divides all the numbers in a given range L to R. NOTE:1 based Indexing.
1 <=N,Q<= 10^5;
1 <= A[i] <= 10^5;
1 <= L <= R <= N
Input:
No of test cases Array size i.e N N array elements No of Queries i.e Q Q queries
Output: Return count of distinct prime numbers which divides all the numbers in a given range for each query
Sample Input:
1 6 4 6 3 18 36 54 3 1 2 3 6 4 6
Sample output:
1 1 2
I do not remember the second question exactly. But It was also based on arrays. Prepare for query-based array questions, MO’s algorithm, Segment tree(if possible) standard questions like range sum queries, update range queries, etc.
Recommended Posts:
- GOCC15: Google SWE Online Coding Challenge Internship 2021
- Google's Online Challenge for 2021 Intern (India) Experience
- Google Internship 2020 - Google Online Challenge(1st Coding Round)
- GOCC15: Google's Online Challenge for Internship (India)
- DE Shaw Summer Internship Interview Experience 2021 | On-Campus VIT Vellore
- Goldman Sachs Interview Experience for Summer Internship 2021
- Goldman Sachs Interview Experience | Campus drive for summer internship 2021 - IIT(BHU)
- BNY Mellon Interview Experience | On-Campus Summer Internship 2021
- Deutsche Bank Interview Experience for Summer Internship 2021
- Samsung Interview Experience for Summer Internship 2021
- Samsung R&D; Interview Experience for Summer Internship 2021 (SRI, Bengaluru)
- Morgan Stanley Interview Experience for Summer Internship 2021
- Morgan Stanley Interview Experience for 2021 Summer Internship (Off-Campus)
- Google Online Challenge(MCQ's) Experience
- Google Online Challenge 2020
- Google Online Challenge 2020(MCQ)
- GOCC14: Google's Online Coding Challenge - New Grad (India)
- GOCC14: Google Online Coding Challenge 2020 - New Grad (India)
- GOCC18: Google Online Coding Challenge 2020 - New Grad(India)
- GOCG13: Google's Online Challenge Experience for Business Intern | Singapore
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.


