IBM interview question

Two Dsa questions were asked easy difficulty level