Panda Guru LogoPanda
Guru

Google OA Question

Round 1

Questions: ISRO is tasked with launching a set of satellites to monitor specific regions on Earth. Each satellite has a limited range within which it can gather data. The goal is to deploy the minimum number of satellites necessary to cover a set of target regions on Earth completely. You are given:

Write an algorithm to calculate the minimum number of satellites required to cover all given target regions completely. If coverage is not possible, return -1.

Additional Details:

Test Cases: 1.

    • targetRegions = [[1, 4], [5, 8], [9, 12]]
    • satellites = [[1, 8], [4, 10], [9, 13]]
    • Expected Output: 2
    • Explanation:
      • Satellite [1, 8] covers [1, 4] and [5, 8].
      • Satellite [9, 13] covers [9, 12].
    • targetRegions = [[1, 5], [6, 10], [11, 15]]
    • satellites = [[1, 4], [6, 9]]
    • Expected Output: -1
    • Explanation:
      • Satellite [1, 4] cannot fully cover [1, 5].
      • The target region [11, 15] is not covered.
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.