HP Inc. interview question

coding: gas station problem os: deadlock, processes, threads, etc.