Apple Interview Question

DSA high level 1 coding question in Round 1 and DSA medium level coding question 4 in Round 2