RailYatri interview question

oops concepts