BookKeeper interview question

find last missing no of array