Amadeus | Tram ride | 25th july 2025

Amadeus · Question · Posted Apr 2026

A city has N Tram stations numbered from 1 to N  that are connected to one another and form a circle. You are given an array ticket_cost  where ticket_cost[i] is the cost of a ticket between the stops number i and (i + 1) % N. The Tram can travel in both directions i.e. clockwise and anti-clockwise. Return the minimum cost to travel between the given start and finish station. You are given an integer N where N represents the total number of the tram stations, an ...

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

Log in Create a free account