← Samsung questions

Find minimum cost to reach destination using bi-directional wormholes

Filed under Samsung

Find the minimum cost to travel from (sx, sy) to (dx, dy). You can move using Manhattan distance or by using any of N bi-directional wormholes, each defined by (x1, y1, x2, y2, cost).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.