bp interview question

was able to answer every question correctl