Amazon SDE Interview Question 2022 April | Graph Theory (Minimum Spanning Trees) | Off-campus
Amazon · Question · Posted Jun 2026
Question 1: Min Cost to Connect All Points Problem Statement You are given an array points representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]. The cost of connecting two points [xi, yi] and [xj, yj] is the Manhattan distance between them: |xi - xj| + |yi - yj|. Return the minimum cost to make all points connected. All points are connected if there is exactly one simple path between any two points. Constraints 1 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account