Coding Blocks interview question

It was mostly based on dsa