Question DSA-GRDY-0057
MediumGas stations: total gas ≥ total cost. Where does the greedy method start the circuit?
- A.
At the station with most gas
- B.
At the station with least cost
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Greedy question
Gas stations: total gas ≥ total cost. Where does the greedy method start the circuit?
At the station with most gas
At the station with least cost
Sign up free to see the answer and a step-by-step explanation.
After the last point where the running tank went negative
At station 0 always