Optiver SWE Interview Question 2023 July | Minimum Spanning Tree | on-campus

Question · Posted Jun 2026

Question 1: Minimum 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 must be connected with no cycles — i.e., form a minimum spanning tree. Constraints ...

The full answer & interview discussion are available to premium members.

Log in Create a free account