CodeArray interview question

dsa and logical questions and code