I got 2 question, able to solve fully 1 and for second 7-8 passed. Rest all failed due to TC
Eg - [0,2,5,9,12,18] gas station - [[2,5],[1,3]]. Answer to be returned is [12,18]. Able to solve in o(n^2). One for loop for traversing gas station array and second loop to calculate total distance travelled. However Got tc in 6-7 cases. Not sure how I could have optimized.