Apple Interview Question

Technical round -> assessment and logic