Demandbase interview question

two questions - dsa based questions