BNY interview question

Coding logics using algorithms in C#