Capital One Interview Question

What does this function do?