Oracle interview question

Gas station( Greedy) leetcode and dp question