FastPrepMinimum Coordinate-Conflict Deletions
Problems/Minimum Coordinate-Conflict Deletions

Minimum Coordinate-Conflict Deletions

Google logoGoogle● HardNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The author described a very similar interview question, not the exact statement. We kept the goal of the fewest deletions. We set integer limits, how repeated points work, and the empty case. Our version is about 95% the same as the reported question.

You are given integer coordinate pairs in points. Delete as few input points as possible so that no two retained points share an x coordinate or share a y coordinate.

Return the minimum number of deletions. Each input occurrence is a separate point, including repeated coordinate pairs. An empty collection requires 0 deletions.

Function

minimumCoordinateConflictDeletions(points: int[][]) → int

Examples

Example 1

points = [[0,1],[0,2],[1,0],[2,0]]return = 2

At most one of the first two points and at most one of the last two points can remain. Keeping (0,1) and (1,0) achieves two deletions.

Example 2

points = [[0,0],[0,1],[1,0]]return = 1

Keep (0,1) and (1,0), deleting only (0,0). A greedy first choice of (0,0) would keep too few points.

Example 3

points = [[1,2],[3,4],[5,6]]return = 0

Every point already has a unique x and a unique y.

Constraints

  • 0 <= points.length <= 500.
  • Every point is a pair [x, y].
  • -10^9 <= x, y <= 10^9.

More Google Onsite Interview questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Reconstruct ItineraryTripjack · ONSITE INTERVIEWTripjack interview questions
  • Largest Island After One Land ConversionAmazon · ONSITE INTERVIEW
  • Spreadsheet Formula DependenciesAmazon Web Services · ONSITE INTERVIEWAmazon Web Services interview questions
  • Deepest Common Ancestors in a Multi-Parent DAGSalesforce · ONSITE INTERVIEWSalesforce interview questions
  • Reconstruct ItineraryPhonePe · ONSITE INTERVIEWPhonePe interview questions
  • Longest Decreasing Matrix Path with Limited RelaxationsDuolingo · ONSITE INTERVIEWDuolingo interview questions
  • Making a Large IslandMeta · ONSITE INTERVIEWMeta interview questions
  • Reconstruct ItineraryBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Course ScheduleOracle · ONSITE INTERVIEWOracle interview questions
  • Package Install OrderVerily · ONSITE INTERVIEW

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
  • Google Experienced SWE First Round and Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public int minimumCoordinateConflictDeletions(int[][] points) {
        // Write your code here
    }
}
Checking account…