As reported: Microsoft SDE2 (Oct 2025), DSA round 1: LeetCode Gas Station — all approaches, from brute force to optimal — plus a few resume questions.
There are n gas stations on a circular route. Station i has gas[i] units; driving from station i to i + 1 costs cost[i]. With an empty tank, find the starting station from which you can travel around the circuit once clockwise, or return -1. If a solution exists, it is unique.
This is LeetCode 134 — Gas Station.
Example 1
gas = [1,2,3,4,5], cost = [3,4,5,1,2] -> 3
Example 2
gas = [2,3,4], cost = [3,4,3] -> -1
Constraints: 1 ≤ n ≤ 10^5; 0 ≤ gas[i], cost[i] ≤ 10^4.
Code runner format: one JSON value per line: gas, cost (LeetCode's test-case format). Implement canCompleteCircuit(gas, cost); the harness prints the result.