HGV Drivers UK Interview Question

Two pointer question from litcode