Binary Search Practice — 1871. Jump Game VII

Problem statement: