Microsoft Interview Question

Wrote a function on white board and asked me to test the function