Pando interview question

2 DSA question- easy level, focused on frontend backend basic understanding