Ciena Interview Question

questions from Codility, mostly from the software engineering side