Zscaler interview question

2 problems DSA in dsa round