DoubtNut interview question

asked about how you solve the aprroach star method